Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am samurailink3 on github.
* I am samurailink3 (https://keybase.io/samurailink3) on keybase.
* I have a public key whose fingerprint is 37E8 CF02 6EAC C295 F9EC 9CB9 CB74 4273 EDA0 E0BB
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am samurailink3 on github.
  • I am samurailink3 (https://keybase.io/samurailink3) on keybase.
  • I have a public key whose fingerprint is 11C9 30C4 693A 6C9B 789B B0F7 6442 DF0A 14BA 4EFD

To claim this, I am signing this object:

@samurailink3
samurailink3 / application.sh
Created January 2, 2014 15:03
Unicorn init.d script
#!/bin/sh
set -e
# Feel free to change any of the following variables for your app:
TIMEOUT=${TIMEOUT-60}
APP_NAME=application
RUBY_ENV="production"
APP_ROOT=/opt/$APP_NAME
PID="$APP_ROOT/tmp/pids/unicorn.pid"
CMD="cd $APP_ROOT && vendor/bundle/ruby/2.0.0/bin/unicorn_rails -c $APP_ROOT/config/unicorn.rb -E $RUBY_ENV -D"
@samurailink3
samurailink3 / GroupQuery.bat
Last active March 5, 2020 22:04
Get list of users from AD group and export to a file. File is roughly fixed-width, so use Excel to break up the data.
dsquery group "CN=Group Name,OU=Groups,DC=Example,DC=com" | dsget group -members | dsget user -ln -fn -samid -email > C:\Users\username\Desktop\file.csv
timidity -Ow -o - input.mid | lame - output.mp3
@samurailink3
samurailink3 / autoexec.cfg
Last active December 23, 2015 03:19
Dota2 AutoExec file. Used to set various options for Dota2. Goes in `Steam\steamapps\common\dota 2 beta\dota\cfg`. This allows: 1. Right click deny 2. Visible spell ranges 3. Exp Range.
dota_force_right_click_attack 1
dota_disable_range_finder 0
dota_range_display 1300
@samurailink3
samurailink3 / .bashrc
Last active December 20, 2015 12:19
Just some helpful .bashrc additions
alias sshw='ssh $user@$ip'
alias sshwdb='ssh $user@$ip -L 3307:127.0.0.1:3306'
alias timestamp='date +%Y-%m-%dT%H:%M:%S%:z'
alias findip='a=$(curl -s ipogre.com/linux.php); a=${a##* }; echo ${a%%<*}'
alias notetoself='gpg -a -s -e -u $myemail -r $myemail -o $HOME/SpiderOak\ Hive/SecureNotes/`timestamp`.asc'
alias notetoview='gpg -v -o -'
alias irc='ssh -t $user@$ip screen -r IRC'
alias t='~/Dropbox/todo/todo.sh'
source ~/Dropbox/todo/todo_completion
complete -F _todo t
a=$(curl -s ipogre.com/linux.php); a=${a##* }; echo ${a%%<*}
@samurailink3
samurailink3 / ie8.css
Created June 28, 2013 17:51
IE8-Specific Navbar Fix
/* ==========================================================================
Fixed-Navbar / Admin Bar Fixes
========================================================================== */
body.admin-bar .navbar-fixed-top{
top: 28px;
}
body{
margin-top: 40px;
}
@samurailink3
samurailink3 / unlock-ps.bat
Last active April 11, 2020 11:37
Command line batch files for unlocking user accounts. For the No-PowerShell version you will need the user's Distinguished Name and an admin account that can unlock accounts. For the PowerShell version, you will need the user's sAMAccountName and an admin account that can unlock accounts.The `unlock-ps.bat` file is easier to work with, but I inc…
@echo off
REM ABOUT: This file will unlock a user account that you specify on the command line.
REM REQUIREMENTS: Powershell with ActiveDirectory Module; Active Directory Account with Unlock permissions.
echo "This file will unlock a user who's username (sAMAccountName) you specify."
SET /P ADDomain=Your domain name:
SET /P AdminUser=Your admin username:
SET /P UserToUnlock=Username you would like unlocked: