Skip to content

Instantly share code, notes, and snippets.

View hackingbutlegal's full-sized avatar
💭
I may be slow to respond.

Jackie Singh hackingbutlegal

💭
I may be slow to respond.
View GitHub Profile
### Keybase proof
I hereby claim:
* I am jackiesingh on github.
* I am jacquelinestokes (https://keybase.io/jacquelinestokes) on keybase.
* I have a public key whose fingerprint is 9F86 7287 B1B7 900C 795C 1D15 9719 9ABB 544E D97E
To claim this, I am signing this object:
@hackingbutlegal
hackingbutlegal / gist:5743955ee411043ce5ba
Created August 20, 2015 23:28
Find files with certain extension and move to specific dir
find / -iname "*.ext" -exec mv {} /root/file_dir \;
@hackingbutlegal
hackingbutlegal / gist:b33e9064a0092392bd90
Created September 16, 2015 19:36
Excel: Trim leading char
=TRIM(CLEAN(SUBSTITUTE(A1,CHAR(1),"")))
@hackingbutlegal
hackingbutlegal / gist:cf4ed2601b7b0fef8157
Created August 24, 2015 21:12
Regex to match on only valid IPs including local and bcast
grep -E -o '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' file.txt
@hackingbutlegal
hackingbutlegal / vj_rsync.sh
Created November 19, 2015 16:47
Some simple rsync thing
#!/bin/bash
# vj_rsync.sh
echo ""
echo "this script does some rsync thing"
echo ""
read -p "press [enter] to start"
echo ""
# hard code the pw between the quotes or fix the script to read input from the command line
@hackingbutlegal
hackingbutlegal / gist:4752007
Created February 11, 2013 02:17
AppleScript to run through a folder, and for any loose files, create a folder for each and name it same as the file. Paste into AppleScript editor, highlight folder in Finder, and click 'Run'.
tell application "Finder"
set selected to selection
set current_folder to item 1 of selected
set mlist to every file of current_folder
repeat with this_file in mlist
set cur_ext to name extension of this_file
set new_name to text 1 thru -((length of cur_ext) + 2) of (name of this_file as text)
set new_folder to make new folder with properties {name:new_name} at current_folder
move this_file to new_folder
end repeat
#!/bin/bash
#
# PURPOSE: Use the 'select' command to create a menu to show system information
# Clear the screen
clear
# Display the menu title header
echo -e "\n\tSYSTEM INFORMATION MENU\n"
#!/usr/bin/python
#
# Description: Bypass clouflare and find the real IP
#
import urllib2
import socket
import string
import re
import subprocess
@hackingbutlegal
hackingbutlegal / gist:4760042
Created February 12, 2013 03:34
Windows: Fix Active Desktop errors
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components"
strValue = "0"
ValueName = "DeskHtmlVersion"
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValue
msgbox "Please Log Off & Log Back In!!!!!!"
#!/bin/bash
#
# SCRIPT: log_keystrokes.bash
#
# PURPOSE: This shell script is used to monitor a login session by
# capturing all of the terminal data in a log file using
# the script command. This shell script name should be
# the last entry in the user's $HOME/.profile. The log file
# is both kept locally and e-mailed to a log file administrative
# user either locally or on a remote machine.