I hereby claim:
- I am natolichris on github.
- I am natc (https://keybase.io/natc) on keybase.
- I have a public key ASCcm1mNlLoPMcn89F1CJyHdgmBXKxtFDwhRyLSAvLEjHQo
To claim this, I am signing this object:
#!/bin/bash | |
# Copies the AWS image from one AZ to another. | |
# Parameters: | |
# 1) image name | |
# 2) from zone | |
# 3) to zone | |
# e.g. ./copy_aws_image rbbc-clean us-west-1 ap-northeast-2 | |
if [[ $# -ne 3 ]]; then |
#!/usr/bin/env python | |
from __future__ import print_function | |
from cryptography.hazmat.primitives.asymmetric import rsa | |
from cryptography.hazmat.primitives import hashes, hmac | |
from cryptography.hazmat.primitives import serialization | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.primitives.asymmetric import padding | |
from cryptography.hazmat.backends import default_backend | |
import os |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
import datetime | |
askday = datetime.date(2015, 12, 1) | |
rightnow = datetime.date.today() | |
days = rightnow.day - askday.day | |
months = (rightnow.year - askday.year)*12 + rightnow.month - askday.month | |
years = months / 12 | |
months = months % 12 |
document.addEventListener("DOMContentLoaded", function(){ | |
/* | |
* Working with colours | |
* Asking for a prompt -> changing the colours | |
*/ | |
//first check if we can access localStorage | |
if(typeof(Storage) !== "undefined"){ | |
//check that it is not NULL and that it exists | |
if(localStorage.background && localStorage.background !== "null"){ | |
document.body.style.background = localStorage.background; |
import XMonad | |
import XMonad.Actions.OnScreen | |
import XMonad.Actions.SpawnOn | |
import XMonad.Layout.Named | |
import XMonad.Layout.IM | |
import XMonad.Layout.Grid | |
import XMonad.Layout.PerWorkspace | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Layout.NoBorders | |
import XMonad.Hooks.ManageDocks |
#!/usr/bin/python | |
import sys, zipfile | |
print "Zipping Files" | |
zName = sys.argv[1] | |
zf = zipfile.ZipFile(zName, mode='w') | |
for i in xrange(len(sys.argv)): | |
if i == 0 or i == 1: | |
continue | |
else: |
import java.util.ArrayList; | |
import java.util.Collections; | |
class PriorityQueueNode implements Comparable<PriorityQueueNode>{ | |
public Integer key; | |
public Object value; | |
//Node constructor; | |
public PriorityQueueNode(Integer key, Object value){ | |
this.key = key; |
import java.util.List; | |
public class BubbleSort { | |
public static void sort(List<Integer> list){ | |
int count = 0; | |
for(int iter = 0; iter < list.size()-1; iter++){ | |
for(int i = 0; i < list.size()-iter-1; i++){ //taking out the already sorted part | |
if(list.get(i) > list.get(i+1)){ | |
int temp = list.get(i); | |
list.set(i, list.get(i+1)); |