Skip to content

Instantly share code, notes, and snippets.

@claudiutraistaru-cluttered
claudiutraistaru-cluttered / django_migration_pk_to_uuid.py
Created October 6, 2021 08:52 — forked from smcoll/django_migration_pk_to_uuid.py
Django migration converting integer pk table to UUID pk table
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import uuid
from django.db import migrations, models
def fill_mymodel_uuid(apps, schema_editor):
db_alias = schema_editor.connection.alias
MyModel = apps.get_model('myapp', 'MyModel')
@claudiutraistaru-cluttered
claudiutraistaru-cluttered / ova-to-box.md
Created June 25, 2021 13:08 — forked from aondio/ova-to-box.md
Convert VirtualBox .ova to Vagrant box

Here's a step by step guide to convert a Virtualbox .ova to a Vagrant box.

  1. List your VMs to find the VM id you want to convert:
$ VBoxManage list vms
"testing" {a3f59eed-b9c5-4a5f-9977-187f8eb8c4d4}
  1. You can now package the .ova VM as Vagrant box:
## Install a necessary packages
$ sudo apt-get install kvm cloud-utils genisoimage
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
$ img_url="${img_url}/ubuntu-12.04-server-cloudimg-amd64-disk1.img"
## download the image
$ wget $img_url -O disk.img.dist
## Create a file with some user-data in it
@claudiutraistaru-cluttered
claudiutraistaru-cluttered / Jenkinsfile
Created January 22, 2021 10:19 — forked from gazoakley/Jenkinsfile
Jenkinsfile for running Terraform
pipeline {
agent any
parameters {
string(name: 'environment', defaultValue: 'default', description: 'Workspace/environment file to use for deployment')
string(name: 'version', defaultValue: '', description: 'Version variable to pass to Terraform')
booleanParam(name: 'autoApprove', defaultValue: false, description: 'Automatically run apply after generating plan?')
}
environment {

Microsoft Windows and Office KMS Setup

{"ignition":{"version":"3.0.0"},"passwd":{"users":[{"name":"core","passwordHash":"$1$nAyiaWFw$ydIOOlYnHBIegRBXx7Nll0"}]}}

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com

Onboarding and the workplace

https://medium.com/@cvitullo/questions-to-ask-your-interviewer-82a26e67ce6c

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
:global ipaddressfull [/ip address get [find interface="vlan2"] address]
:global ipaddress [:pick $ipaddressfull 0 [:find $ipaddressfull "/"]]
:global actualhostnameip 0.0.0.0
:do {
:put [:global actualhostnameip [:resolve host.toupdate.com]];
} on-error={ :log info "update_bind_test: Error retrieving host ip";}
:if ($ipaddress != $actualhostnameip) do={
local noop = require('utils.noop')
local typeCheck = require('utils.type-check')
-- module object
local M = {}
-- value that signifies the function is done and should be removed from the list
local CLEANUP = {}
--[[