Skip to content

Instantly share code, notes, and snippets.

View synackme's full-sized avatar

Landon Mayo synackme

  • Houston, Tx
View GitHub Profile
@synackme
synackme / PKCS2PEM.txt
Created January 16, 2014 23:25
Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes
@synackme
synackme / remove_blanks.sh
Created February 6, 2014 01:29
cat a file & pipe to egrep to remove lines
grep -v \# foo.txt | egrep '^$' -v
@synackme
synackme / mac_osx_apache_group.txt
Created February 7, 2014 07:07
In order to retain full ownership of the files and directories but give access to Apache, one wants to use the ACL feature built into Mac OS X. By using sudo chmod -R +a '_www allow read,write,delete,add_file,add_subdirectory,file_inherit,directory_inherit' <dir>, you’ll grant the required permissions to Apache while keeping everything else inta…
sudo chmod -R +a '_www allow read,write,delete,add_file,add_subdirectory,file_inherit,directory_inherit' <dir>
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
#
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/
#
@synackme
synackme / Tilt3d.controls.image.md
Created February 27, 2014 09:34
HTML Code: Screenshot of Tild3d Controls

Keyboard-Tilt3d.png

Given the following example html:
<div class="announcementInfoText">
<p class="copyToClipboard">
<a id="selectAll">Select All Text</a>
</p>
<textarea ID="description" class="announcementTextArea">This is some sample text that I want to be select to copy to the clipboard</textarea>
</div>
you can select the text within the textarea with the following jQuery:
$("#selectAll").click(function () {
$(this).parents(".announcementInfoText").children("textarea").select();
@synackme
synackme / yt-chanrip.sh
Created March 4, 2014 08:21
Download Entire YouTube Channel - all of a user's videos Download Entire YouTube Channel - all of a user's videos create the function then run 'yt-chanrip username' to download that user's entire channel. uses youtube-dl and the GData API. similar to http://www.commandlinefu.com/commands/view/3154/download-youtube-playlist
yt-chanrip() { for i in $(curl -s http://gdata.youtube.com/feeds/api/users/"$1"/uploads | grep -Eo "watch\?v=[^[:space:]\"\'\\]{11}" | uniq); do youtube-dl --title --no-overwrites http://youtube.com/"$i"; done }
@synackme
synackme / dnsleak.sh
Created March 4, 2014 08:23
Check if your ISP is intercepting DNS queries It's somewhat common ISPs to intercept DNS queries at port 53 and resolve them at their own. To check if your ISP is intercepting your DNS queries just type this command in the terminal. "#.abc" it's an OK answer. But if you get something like "I am not an OpenDNS resolver.", yep, you are beign cheat…
dig +short which.opendns.com txt @208.67.220.220
@synackme
synackme / hidden-off.sh
Last active August 29, 2015 13:57
OS X - Show/Hide Hidden Files
defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder
@synackme
synackme / searchSF.sh
Last active August 29, 2015 13:57
Search Query URLs
searchTerm=$1
## Salesforce Search Query
sf="https://na3.salesforce.com/_ui/search/ui/UnifiedSearchResults?searchType=2&sen=068&sen=005&sen=006&sen=501&sen=001&sen=00T&sen=500&sen=003&sen=00U&sen=a0V&sen=00O&sen=a0R&sen=00a&str=$searchTerm"