This file contains 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/sh | |
filename=$1 | |
echo "Begin processing file:" $filename | |
dimensions=$(identify -format '%w %h' $filename) | |
IFS=' ' read -a array <<< "$dimensions" | |
width=${array[0]} | |
height=${array[1]} |
This file contains 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 | |
# required library to create a matrix | |
import numpy | |
# random int library | |
from random import randint | |
from pprint import pprint |
This file contains 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
data =xlsread('data.xlsx'); | |
vec1 = data (:,1); | |
vec2 = data (:,2); | |
mean_vec1 = mean(vec1) | |
hold on | |
find(vec1); | |
find(vec2); | |
hold on; |
This file contains 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 nl2lb(value): | |
return value.replace('\n', '<div class="line-break"></div>') | |
# Or even simpler | |
def nl2br(value): | |
return value.replace('\n', '<br>') |
This file contains 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/sh | |
sudo newfs_msdos -v EFI -F 32 /dev/rdisk0s1 | |
sudo mkdir /Volumes/EFI | |
sudo mount -t msdos /dev/disk0s1 /Volumes/EFI | |
sudo rm -rf /Volumes/EFI/EFI | |
sudo cp -R /EFI /Volumes/EFI | |
sudo diskutil unmount /Volumes/EFI |
This file contains 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
$(document).ready(function(){ | |
$('.close').click(function(){ | |
$(this).closest('.popover').remove(); | |
}); | |
}); |
This file contains 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
<?php | |
print("function called!"); | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
function CallAPI($method, $url, $data = false) | |
{ |
This file contains 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
#sudo docker run --name openvpn-deluge --privileged --restart=always -v /home/nick/Dev/vpn:/vpn -v /home/deluge/.config/deluge:/deluged/config -v /disk1:/disk1 -i -t openvpn_deluge /bin/bash | |
FROM ubuntu:14.04 | |
MAINTAINER Nick Woodhams | |
RUN apt-get -y update | |
RUN apt-get install -y openvpn | |
RUN apt-get install -y deluged deluge-web deluge-console | |
COPY start.sh start.sh | |
CMD ["/start.sh"] |
This file contains 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
-----BEGIN CERTIFICATE----- | |
MIIERDCCAyygAwIBAgIDAjp4MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT | |
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i | |
YWwgQ0EwHhcNMTQwODI5MjIyNDU4WhcNMjIwNTIwMjIyNDU4WjBmMQswCQYDVQQG | |
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UECxMURG9tYWluIFZh | |
bGlkYXRlZCBTU0wxIDAeBgNVBAMTF0dlb1RydXN0IERWIFNTTCBDQSAtIEc0MIIB | |
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA30GUetr35DFDtuoBG1zOY+r6 | |
baPZau4tmnX51ZxbvTTf2BzJbdgEiNputbe18DCuQNZd+sRTwdQinQROEaaV1UV8 | |
QQVY4Ezd+e5VvV9G3K0TCJ0s5PeC5gcrng6MNKHOxKHggXCGAAY/Lep8myiuGyiL | |
OQnT5/BFpLG6EWeQVXuP3u04XKHh44PEw3KRT5juHMKAqmSlPoNiHMzgnvhawBMS |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Post push to Staging | |
~~~~~~~~~~~~~~~~~~~~ | |
No more manual cache clearing | |
""" | |
from selenium import webdriver | |
from selenium.common.exceptions import TimeoutException |