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
Windows Registry Editor Version 5.00 | |
;-------------------------- | |
; Save as .reg and execute | |
;-------------------------- | |
; This will make it appear when you right click ON a folder | |
; The "Icon" line can be removed if you don't want the icon to appear | |
[HKEY_CLASSES_ROOT\Directory\shell\sublime] |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Fluid Layout</title> | |
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" /> | |
<style rel="stylesheet" type="text/css"> | |
body { background-color:black; margin:0px; padding:0px; } | |
.pageBox { position:absolute; top:20px; left:20px; right:20px; bottom:20px; min-width:200px} | |
.headerBox { position:absolute; width:100%; height:50px; background-color:#333; } | |
.contentBox { position:absolute; width:100%; top:52px; bottom:32px; background-color:blue; } |
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
function generateBase64ZipFromString(filenameInZip, fileContents, password, tmpDir) { | |
importPackage(Packages.net.lingala.zip4j); | |
var uuid = UUIDGenerator.getUUID(); | |
var filenameZip = tmpDir + uuid + ".zip"; | |
var filenameCsv = tmpDir + uuid + ".csv"; | |
var zipFile = new Packages.net.lingala.zip4j.core.ZipFile( filenameZip ); |
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
var mysql = require('mysql'); | |
var toMarkdown = require('to-markdown').toMarkdown; | |
var fs = require('fs'); | |
var os = require('os'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'user', | |
password : 'password', | |
database : 'database' |
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
Convert every *.jpg into a thumbnail with 85% quality and size 125 x Auto, named tn-{originalfilename} | |
$ for file in *.jpg; do convert $file -thumbnail 125x -quality 85 tn-$file; done | |
$ for file in *.jpg; do convert $file -resize 800x600\! $file; done | |
Get screenshot from video frame | |
$ ffmpeg -ss 00:09:00 in.avi -vcodec png -vframes 1 -an -f rawvideo -s 119x64 out.png | |
or | |
$ffmpeg -ss 00:09:00 in.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 119x64 out.jpg |
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
function sendCORSRequest(url, method) | |
{ | |
// IE8+ only Cross domain JSON GET request | |
if ('XDomainRequest' in window && window.XDomainRequest !== null) { | |
var xdr = new XDomainRequest(); // Use Microsoft XDR | |
xdr.open('get', url); | |
xdr.onload = function (data) { | |
var dom = new ActiveXObject('Microsoft.XMLDOM'), | |
json = $.parseJSON(xdr.responseText); |
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
set -g default-terminal "screen-256color" | |
set -g mode-mouse on | |
set-window-option -g mode-mouse on | |
set -g mouse-resize-pane on | |
set -g mouse-select-pane on | |
set -g mouse-select-window on | |
set -g base-index 1 | |
set -g status-utf8 on | |
set -g status-keys vi | |
set -g status-interval 1 |
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
import json | |
import pyexiv2 | |
import os | |
import shutil | |
from models import StorageVolume | |
STORAGE_CONFIG = { | |
'bits_levels': [ 2, 1 ], | |
'volumes': [ |
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
$ for f in *.wav; do ffmpeg -i $f "${f%.*}.mp3"; done |
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
# Ubuntu 14 | |
wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb | |
sudo dpkg -i puppetlabs-release-trusty.deb | |
sudo apt-get update | |
apt-get install puppetmaster | |
puppet -V | |
sudo puppet apply --modulepath ./modules manifests/default.pp |