This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# iso2usb is a simple script for OSX to ease the conversion of an iso to an img file | |
# and then dd that img file to a USB of your choosing. You simply give it the iso | |
# as a parameter and then the disk number and it will take care of the rest. | |
# based on the commands here: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx | |
# and the color commands here: http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux | |
# exits out of the script upon error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// replace the empty schemes section with this or copy the relevant bit into your current schemes set up | |
"schemes": [ | |
{ | |
"background" : "#292E36", | |
"foreground" : "#F8F8F0", | |
"black" : "#6A6A6A", | |
"blue" : "#2a94a8", | |
"green" : "#85C258", | |
"cyan" : "#48BBD1", | |
"red" : "#DD4242", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Lib: JSON.ahk | |
* JSON lib for AutoHotkey. | |
* Version: | |
* v2.1.3 [updated 04/18/2016 (MM/DD/YYYY)] | |
* License: | |
* WTFPL [http://wtfpl.net/] | |
* Requirements: | |
* Latest version of AutoHotkey (v1.1+ or v2.0-a+) | |
* Installation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
import sys, os, ipaddress, sqlite3, requests | |
from tabulate import tabulate #you can download tabulate via pip install | |
DATABASE_FILE = 'FILE_LOCATION_HERE' | |
DATABASE_EXISTS = os.path.isfile(DATABASE_FILE) | |
MESSAGE = 'Script ran successfully. A message should appear here every hour.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Paste Stuff</title> | |
<link rel="stylesheet" href="pure-min.css"> | |
</head> | |
<body> | |
<div align="center"> | |
<h1>Paste Stuff</h1> | |
<form class="pure-form pure-form-aligned" action="/" name="notes" method="post"> | |
<fieldset class="pure-group"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
f = open(sys.argv[1],'r').readlines() | |
arr = [] | |
proc = False | |
for line in f: | |
if "begin-pro" in line: | |
print line.strip() | |
proc = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/base64" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
// inspired by https://tour.golang.org/flowcontrol/8 | |
func Sqrt(loop int, seed, square float64) float64 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import subprocess, string, os, re | |
# Important variables up here to make it easier to change later on | |
_BLOG_DIR = "/path/to/blog/here" | |
_BLOG_DIR_CONTENT = _BLOG_DIR + "/content/" | |
_EDITOR = "mate" # I use textmate, but you can change this to whatever you want |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bubsort(a): | |
i = len(a) | |
counter = 0 | |
while i > 0: | |
for j in range(len(a)): | |
h = j+1 | |
if h < len(a): | |
if a[j] > a[h]: | |
temp = a[h] | |
a[h] = a[j] |
NewerOlder