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
@hackingbutlegal
hackingbutlegal / delete-twitter-dm.js
Created January 30, 2019 16:15 — forked from taviso/delete-twitter-dm.js
Automate deleting twitter direct messages.
// Open direct messages window, paste this into console.
function deleteNextConversation()
{
if (!(dm = document.getElementsByClassName("DMInbox-conversationItem")[0])) {
clearInterval(tmr)
return;
}
dm.firstChild.click();
setTimeout('document.getElementsByClassName("js-actionDeleteConversation")[0].click()', 1000);
@hackingbutlegal
hackingbutlegal / dir2html.sh
Last active November 11, 2016 17:09
Generate html file from a directory of files. Usage: ./dir2html.sh [path to dir] > index.html
#!/bin/bash
# usage: dir2html.sh [dir] > index.html
INDEX=`ls -1 $1 | sed "s/^.*/ <li\>\<a\ href=\"&\"\>&\<\\/a\>\<\\/li\>/"`
echo "<html>
<head><title>Index of $1</title></head>
<body>
<h2>Index of $1</h2>
<hr>
<ui>
$INDEX

Keybase proof

I hereby claim:

  • I am find-evil 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 / long-domain-names.txt
Created January 21, 2016 07:51 — forked from jedisct1/long-domain-names.txt
Long domain names are long. Hopeless SEO, domains registered by cats and WTF domains.
1-tr-18su-ka-8dow-56-oo9-13swx-r-k-ife-0nj-rnq-ihb-dd-p-1-0-z-a.info.
292fu2013-1-2-3-htt-4t3l60-zqn673-w9gp7kip0422wemrzsftm-htm-com.info.
aljumahiriyahalarabiyahallibiyahashshabiyahalishtirakiyahaluzma.info.
anderson-piedmont-spartanburg-greenville-easley-spine-pain-care.info.
associationfrancaisedesdirecteursdelaphotographiedelatelevision.info.
audio-player-zawqkerrhfoepdnmvbdkslahgjvklahjkfqqqojcgrtsksmcls.info.
ausencosandwellascentisaaxwaynegossruddswanheinercrimemellifont.info.
australianpublicsectoranti-corruptionconference2009fraudrortsin.info.
bewarecrimestoppersassistcorruptpolicepoliticcrimecriminalfraud.info.
camp-the-lycian-way-camps-the-lycian-way-camping-lycian-way-map.info.
@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: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 / 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 \;
### 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 / startup_processes.ps1
Last active August 29, 2015 14:07
PowerShell script to pull Windows startup items
echo "Host,StarupProcess" > StartupProcesses.csv
Get-ADComputer -filter {OperatingSystem -like "*Windows*"} | foreach { $_.Name} > computers.txt
foreach ($x in (get-content computers.txt) )
{
if (Test-Connection -Count 1 -computername $x) {
$Object = Get-WmiObject -Class Win32_StartupCommand -computername $x
foreach ($y in $Object.Command) {
echo "$x,$y" >> StartupProcesses.csv
}
} else {