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/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib | |
import argparse | |
import imutils | |
import cv2 | |
import numpy as np | |
import sys |
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/bash | |
TIME=`date '+%Y-%m-%d-%H-%M-%S'` | |
echo "Using Time identifier: $TIME"; | |
INDEX=0 | |
gphoto2 --auto-detect | tail -n +3 | awk '{print $4}' | while read line | |
do | |
rm -f capt0000.jpg |
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 | |
define('THRESHOLD', 80); | |
$res = shell_exec('/bin/df -h | /bin/grep \'/dev/sda2\' | /usr/bin/awk \'{print $5}\''); | |
$res = floatval(str_replace('%', '', trim($res))); | |
if($res > THRESHOLD){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://hooks.slack.com/services/T01234567/B11234567/123456712345671234567'); | |
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode([ |
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
.stars { | |
position: relative; | |
font-size: 20px; | |
} | |
.stars.big | |
{ | |
font-size: 40px !important; | |
} |
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
alias fuck="sudo" | |
alias gitf="git fetch" | |
alias gimme="brew install" | |
alias vhosts="fuck nano /etc/apache2/extra/httpd-vhosts.conf" | |
alias jspf="jspm i --unlink --force" | |
alias rserv="brew services restart | |
alias a2r="sudo apachectl -k restart" | |
alias dm="docker-machine" | |
denv(){ |
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 apt-get update -y | |
sudo apt-get install -y git | |
sudo gem install sass | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
sudo apt-get install -y build-essential tcl8.5 | |
wget http://download.redis.io/releases/redis-stable.tar.gz |
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 apt-get update -y | |
sudo apt-get install -y git | |
sudo gem install sass | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo npm i -g grunt-cli bower forever | |
sudo npm i -g node-sass |
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
function delay(time) { | |
return new Promise(function (fulfill) { | |
setTimeout(fulfill, time); | |
}); | |
} |
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
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
yum -y --enablerepo=remi,remi-test install redis |
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
(function bindDeadSimpleMvc($) { | |
var updateBindings = function () { | |
console.log($(this).attr('placeholder')); | |
$('[data-bind="' + $(this).attr('data-bind-variable') + '"]').html($(this).val()); | |
}; | |
$('input[data-bind-variable]').on('change keyup', updateBindings).each(updateBindings); | |
})(jQuery); |
NewerOlder