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 | |
## gif_to_mpeg | |
## Based on http://stackoverflow.com/a/3212958 and http://apple.stackexchange.com/a/103834 | |
## charles.erwin@vendscreen.com | |
## Take first argument which should be a filename | |
if [ -z "$1" ] | |
then | |
echo "Usage: $0 'filename.gif'" |
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/php | |
<?php | |
// Request: Local emoji-web (http://emoji.xyz/shorten) | |
$ch = curl_init("http://emoji.xyz/shorten"); | |
curl_setopt($ch, CURLOPT_POST, TRUE); | |
// Headers | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
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
// Log of Currently Installed WeiDU Mods | |
// The top of the file is the 'oldest' mod | |
// ~TP2_File~ #language_number #component_number // [Subcomponent Name -> ] Component Name [ : Version] | |
~SETUP-BGTTWEAK.TP2~ #0 #2300 // Disable hostile reaction after charm: 8 | |
~BG2_TWEAKS/SETUP-BG2_TWEAKS.TP2~ #0 #40 // Change Viconia's Skin Color to Dark Blue: v9 | |
~BG2_TWEAKS/SETUP-BG2_TWEAKS.TP2~ #0 #60 // Weapon Animation Tweaks: v9 | |
~BG2_TWEAKS/SETUP-BG2_TWEAKS.TP2~ #0 #70 // Icewind Dale Casting Graphics (Andyr): v9 | |
~BG2_TWEAKS/SETUP-BG2_TWEAKS.TP2~ #0 #100 // Commoners Use Drab Colors: v9 | |
~BG2_TWEAKS/SETUP-BG2_TWEAKS.TP2~ #0 #110 // Icon Improvements: v9 | |
~BG2_TWEAKS/SETUP-BG2_TWEAKS.TP2~ #0 #1010 // More Interjections: v9 |
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
blah = [name: 'poop', status: 'tudus', null: 'EAD'] | |
foo = 'name' | |
bar = 'status' | |
baz = null | |
println blah[baz] | |
blah.put(null, 'NOOBER') |
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 | |
export pad="60" | |
printf "%-${pad}s" "Counting files:" | |
echo `ls -1 | wc -l` | |
#printf "%-${pad}s" "Create copies of .png files" | |
# for filename in *.png; do cp "$filename" "${filename}_big.png"; done && echo "done" | |
# |
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
# .---------------- minute (0 - 59) | |
# | .------------- hour (0 - 23) | |
# | | .---------- day of month (1 - 31) | |
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... | |
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | |
# | | | | | | |
# * * * * * user-name command to be executed | |
* * * * * echo "How did we get here?" |
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
baseDir = "/Users/user/Documents/Archive" | |
alphabetRange = ('A'..'Z') | |
alphabetList = new ArrayList (alphabetRange) | |
alphabetList.each{letter -> | |
file = new File("${baseDir}/$letter").mkdirs() | |
} |
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
private static int counter = 0; | |
private static synchronized java.lang.String getUniqueSuffix() { | |
// reset the counter if it is greater than 99999 | |
if (counter > 99999) { | |
counter = 0; | |
} | |
counter = counter + 1; | |
return java.lang.Long.toString(java.lang.System.currentTimeMillis()) + "_" + counter; | |
} |
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
! 4/20/2019 https://www.youtube.com | |
www.youtube.com##.size-small.style-suggestive.ytd-button-renderer.style-scope | |
! 5/27/2019 https://www.youtube.com | |
www.youtube.com##.ytd-button-renderer.style-scope.yt-simple-endpoint |