Skip to content

Instantly share code, notes, and snippets.


Adam Buga liladas

View GitHub Profile
liladas /
Created Jun 8, 2018 — forked from XueshiQiao/
Generate a MP4 Video for your Git project commits using Gource!
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install
View deploys3.js
const AWS = require('aws-sdk');
const fs = require('fs');
const mime = require('mime-types')
const path = require("path");
// Base AWS config.
// AWS Reference: Make sure the profile exists in ~/.aws/credentials
// See managing access keys:
oseiskar /
Last active Oct 8, 2020
Converts Swagger YAML to a static HTML document (needs: pip install PyYAML)
# Copyright 2017 Otto Seiskari
# Licensed under the Apache License, Version 2.0.
# See for the full text.
# This file is based on
# (Copyright 2017 SmartBear Software, Licensed under Apache 2.0)
BrnoPCmaniak /
Last active Oct 31, 2019
Pass multiple parametrs into Django filter
"""Pass multiple parametrs into Django filter.
Inspired by
By this filters you can chain as many variables into parametrs as you like.
You can even make different lengths for one filter.
WARNING: You have to apply n_chain_end filter at the end of the n_chains.
Thanks to this the intial var can also be tupple.
barseghyanartur /
Last active Nov 24, 2017 — forked from fabiocaccamo/
Clean media by deleting those files which are no more referenced by any FileField (django command)
# -*- coding: utf-8 -*-
import os
import sys
from six.moves import input
from django.conf import settings
from import BaseCommand, CommandError
from django.apps import apps

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
import time
from boto.ec2.autoscale import AutoScaleConnection
def find_unused_launch_configs():
conn = AutoScaleConnection()
autoscale_groups = conn.get_all_groups(max_records=100)
launch_configs = conn.get_all_launch_configurations(max_records=100)
launch_config_names = { for lc in launch_configs}
andyferra / github.css
Created Apr 30, 2012
Github Markdown CSS - for Markdown Editor Preview
View github.css
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
steder /
Created Dec 19, 2011
Create and update AWS security groups using Python and Boto.
#!/usr/bin/env python
Recipe for creating and updating security groups programmatically.
import collections
import boto
You can’t perform that action at this time.