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 | |
# Download latest Debian image for microSD from https://beagleboard.org/latest-images | |
# List drives before inserting microSD | |
df -h | |
# Insert microSD, then Look for the newly listed SD drive (disk2s1) | |
df -h | |
# Unmount the microSD |
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
Linux/BSD/POSIX/Source | |
Run the following command to start btcd: | |
$ btcd --testnet -u rpcuser -P rpcpass | |
Copy btcd's autogenerated rpc.cert to ~/.btcwallet/ so btcwallet can securely communicate with btcd over a TLS-encrypted websocket. This step is only necessary for the first time starting btcwallet or if | |
btcd's autogenerated cert and key are removed and regenerated. | |
$ mkdir ~/.btcwallet/ | |
$ cp ~/.btcd/rpc.cert ~/.btcwallet/btcd.cert |
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 | |
# initial email config | |
git config --global --edit | |
# per commit modify name | |
git commit --amend --author="patterns <>" | |
# sync overwriting local branch | |
git fetch --all | |
git reset --hard origin/gh-pages | |
# typical github pages steps |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/s3/s3manager" |
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 | |
#brew install youtube-dl | |
#brew install ffmpeg | |
youtube-dl --extract-audio --audio-format mp3 -k https://youtu.be/short-url-path |
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 | |
INFILE="$1" | |
TMPOUTFILE="${INFILE%.*}" | |
OUTFILE="${TMPOUTFILE##*/}.m4a" | |
ffmpeg -i "${INFILE}" -vn -acodec copy "${OUTFILE}" |
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 | |
ffmpeg -ss 00:00:00.000 -i Source.mp3 -t 44 -c copy cut00.mp4 |
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
package main | |
import ( | |
"crypto/sha1" | |
"crypto/sha256" | |
"fmt" | |
) | |
// Adaptee is the existing functionality. | |
type Adaptee struct { |
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
Reference https://msdn.microsoft.com/en-us/library/orm-9780596527730-01-04.aspx | |
Attempt of the pluggable adapter according to this excerpt: | |
// Existing way requests are implemented | |
class Adaptee { | |
public double Precise (double a, double b) { | |
return a/b; | |
} | |
} |
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
#lru.py | |
#loop input until 'EXIT' | |
read_line = "" | |
data = [] | |
while read_line.lower() != "exit": | |
read_line = raw_input() | |
if read_line.lower() != "exit": | |
data.append(read_line) |