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/env ruby | |
require 'uri' | |
# Helper to get hostnames from referrer fields | |
def get_host(url) | |
begin | |
URI.parse(url).host.to_s | |
rescue StandardError | |
'' |
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
main: install | |
install: | |
sudo cp ./clean-creds.sh /usr/bin/clean-creds | |
sudo chmod 777 /usr/bin/clean-creds |
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/env bash | |
sudo modprobe snd-hda-intel | |
sudo alsactl init |
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
// TODO: fix imports | |
public class EfficientSwap { | |
/** | |
* This method should print its parameters in opposite order. | |
* E.g. swap(3, 4) should print 4 then 3. | |
*/ | |
public static void swap(int a, int b) { | |
a = 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
#define OUT_A 0 | |
#define OUT_B 1 | |
#define OUT_C 2 | |
#define OUT_D 3 | |
#define SEG_G 4 | |
#define DRIVER_ENABLE 5 | |
#define DISP_DASH -1 | |
#define DISP_BLANK -2 |
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/env bash | |
sudo ln -s /usr/bin/nodejs /usr/bin/node |
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/env bash | |
if [ ! $1 ] | |
then | |
echo "Usage: fsearch [STRING]" | |
exit | |
fi | |
grep -nr . -e $1 |
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 | |
if [ ! $1 ] | |
then | |
echo "Usage: gemfind.sh GEMNAME" | |
exit | |
fi | |
echo `gem list | grep $1` |
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 | |
find . -type f -exec sed -i -e 's/FIRST (20[0-1][0-9])-(20[0-1][0-9])\./FIRST \1-2017./g' {} \; | |
find . -type f -exec sed -i -e 's/FIRST (20[0-1][0-9])\./FIRST \1-2017./g' {} \; |
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 | |
branch=`git rev-parse --abbrev-ref HEAD` | |
git branch --set-upstream-to=origin/$branch $branch |
NewerOlder