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
bind status P !git push origin | |
bind status x !mv %(file) /tmp | |
bind main R !git reset --soft %(commit) | |
bind main P !git pull -r |
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
--SELECT | |
-- * | |
--FROM | |
-- crime_scene_report | |
--WHERE | |
-- date = 20180115 | |
-- AND city = 'SQL City' | |
-- AND type = 'murder' | |
--Security footage shows that there were 2 witnesses. The first witness | |
--lives at the last house on "Northwestern Dr". The second witness, named |
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
var next = (numberString) =>{ | |
const count = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | |
for(c of numberString){ | |
count[parseInt(c)]++ | |
} | |
let nextString = "" | |
for(c of numberString){ | |
if(count[parseInt(c)] > 0){ | |
nextString += count[parseInt(c)] + c | |
count[parseInt(c)] = 0 |
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
import boto3 | |
import datetime | |
import os | |
import json | |
def test_instance(ec2_client): | |
ec2_client.request_spot_instances( | |
DryRun=False, | |
SpotPrice='0.02', | |
ClientToken='string', |
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
;;Using cygwin | |
(setq find-program "\"C:/cygwin64/bin/find.exe\"") | |
(setq grep-program "\"C:/cygwin64/bin/grep.exe\"") | |
;; Prevent issues with the Windows null device (NUL) | |
;; when using cygwin find with rgrep. | |
(defadvice grep-compute-defaults (around grep-compute-defaults-advice-null-device) | |
"Use cygwin's /dev/null as the null-device." | |
(let ((null-device "/dev/null")) | |
ad-do-it)) | |
(ad-activate 'grep-compute-defaults) |
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
from PIL import Image, ImageFilter, ImageChops, ImageEnhance | |
import sys | |
original_img = sys.argv[1] | |
dest_img = sys.argv[2] | |
mask_strength = sys.argv[3] | |
original = Image.open(original_img) | |
gray = original.convert("LA") | |
blurred = gray.filter(ImageFilter.GaussianBlur(radius=5)) |
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
if [ -z "$1" ] | |
then | |
echo ".blend logo file as argument" | |
fi | |
blender -b $1 -S XXXHDPI -o //mipmap-xxxhdpi/ -a -S XXHDPI -o //mipmap-xxhdpi/ -a -S XHDPI -o //mipmap-xhdpi/ -a -S HDPI -o //mipmap-hdpi/ -a -S MDPI -o //mipmap-mdpi/ -a | |
mv ./mipmap-xxxhdpi/0001.png ./mipmap-xxxhdpi/ic_launcher.png | |
cp ./mipmap-xxxhdpi/ic_launcher.png ./mipmap-xxxhdpi/ic_launcher_round.png | |
mv ./mipmap-xxhdpi/0001.png ./mipmap-xxhdpi/ic_launcher.png | |
cp ./mipmap-xxhdpi/ic_launcher.png ./mipmap-xxhdpi/ic_launcher_round.png |
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
echo "#################################Temperature" | |
sensors | |
echo "#################################Space available" | |
df -h | |
echo "#################################Processes" | |
ps aux | |
echo "#################################Processes system usage" | |
top -b -n 1 | |
echo "#################################List open files" | |
lsof -i |
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
var indexes = {date:0,description:3,valueSign:6,value:5,balance:7}; | |
var sums = new Array(); | |
function allMonthsSummed(){ | |
console.log("allMonthsSummed"); | |
var divMenuAno = document.getElementById('TRNnoprint03'); | |
var values = document.createElement("textarea"); | |
values.style.width = "100%"; | |
values.style.height = "25em"; | |
for(var i in sums) |
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 | |
if pidof compiz; then | |
metacity --replace& | |
else | |
compiz --replace& | |
fi |