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
hs.audiodevice.watcher.setCallback(function(evt) | |
if evt == "sOut" or evt == "dOut" then | |
hs.eventtap.keyStroke({}, 'F8') | |
end | |
qcyMac = "00-00-00-00-00-00" | |
devices = hs.execute("/usr/local/bin/blueutil --paired | grep -i qcy | grep -i slave"); | |
if(string.len(devices) > 0) then | |
hs.execute("/usr/local/bin/blueutil --disconnect " .. qcyMac) |
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 | |
echo "********************" | |
echo "Post receive hook: Updating website" | |
echo "********************" | |
#set the git repo dir | |
GIT_REPO_DIR=~/git/<repo>.git | |
echo "The git repo dir is $GIT_REPO_DIR" |
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
F2:: | |
Send {Volume_Down} | |
Return | |
F3:: | |
Send {Volume_Up} | |
Return |
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
'tax_query' => array( | |
array( | |
'taxonomy' => 'liveblog', | |
'field' => 'name', | |
'terms' => $id, | |
), | |
), |
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 graph = require('fbgraph'); | |
var access_token = ''; | |
graph.setAccessToken(access_token); | |
getTheThing(); | |
function getTheThing(url = "/me/posts/?fields=story,privacy") { | |
graph.get(url, function(err, res) { |
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 fs = require('fs'); | |
fs.readFile('test.json', function(error, data) { | |
if (error) { | |
console.log(error); | |
return; | |
} | |
var obj = JSON.parse(data); |
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 fso = new ActiveXObject("Scripting.FileSystemObject"); | |
var wshshell = new ActiveXObject("wscript.shell"); | |
var localAppData = wshshell.ExpandEnvironmentStrings("%localappdata%"); | |
var userProfile = wshshell.ExpandEnvironmentStrings("%USERPROFILE%"); | |
var lsbCacheLocation = localAppData + "\\Packages\\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\\LocalState\\Assets"; // might need to be changed | |
var lsbDesktop = userProfile + "\\Desktop\\lsbCache"; | |
var a = fso.CopyFolder(lsbCacheLocation, lsbDesktop); | |
var allFiles = fso.GetFolder(lsbDesktop); | |
var nfName = 0; | |
for (var index = new Enumerator(allFiles.Files); !index.atEnd(); index.moveNext()) { |
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 | |
echo -n "INPUT FILENAME > " | |
read fINPUT | |
echo -n "OUTPUT FILENAME > " | |
read fOUTPUT | |
sed -e 's/ENGINE=Aria/ENGINE=InnoDB/' -e 's/PAGE_CHECKSUM=1//' -e 's/TRANSACTIONAL=1//' $fINPUT > $fOUTPUT; | |
read -p "Press any key to exit..." |
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/bash | |
i=1; | |
IFS=$'\n'; | |
for f in `find . -name "*.otf" -type f | grep -i regular | grep -v -i macosx`; do | |
convert -size x100 -gravity center -font "$f" -pointsize 16 label:"${f##*/}: some text" font_$((i++)).png; | |
done; | |
convert -append font_*.png fonts.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
$(window).load( function() { | |
$('.equalize-by-first > div').height(function() { | |
if( $(this).index() !== 0 ) { | |
var zHeight = $('.equalize-by-first > div:first-child').outerHeight(); | |
return zHeight; | |
} | |
}); | |
}); |
NewerOlder