Skip to content

Instantly share code, notes, and snippets.

James Martinez jamescmartinez

Block or report user

Report or block jamescmartinez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jamescmartinez / disable-retweets.js
Last active Mar 7, 2018
Want to disable retweets for everyone you're following? Run this script on the Twitter following page. --- Inspired by this post:
View disable-retweets.js
document.querySelectorAll("div.ProfileCard-content div.dropdown").forEach(function(element){
element.querySelector("li.retweet-off-text button").click();
jamescmartinez /
Last active Nov 8, 2018
Script to Install Latest Ruby on Raspberry Pi (Raspbian)
# Install asdf, our Ruby version manager
git clone ~/.asdf
echo -e '\n. $HOME/.asdf/' >> ~/.bashrc
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc

# Install dependencies (source:
sudo apt-get update
sudo apt-get install automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev
jamescmartinez /
Last active Aug 13, 2019
My checklist for trackdays and races

Week Before

  • Inspect Motorcycle
  • Purchase Track Day / Register for Race


  • Motorcycle
  • Motorcycle Key
  • Tools
  • Oil Funnel
  • Zip Ties
jamescmartinez / .gitignore
Created Apr 14, 2017
.gitignore for iOS projects
View .gitignore
jamescmartinez / .gitignore
Last active Jan 11, 2017
New Node Project .gitignore and package.json
View .gitignore
jamescmartinez / slack_emails.rb
Created Nov 10, 2016
This Ruby script will fetch email addresses for all of your members. Just add your API token from into the token quotes at the top of the file.
View slack_emails.rb
require 'csv'
require 'json'
require 'net/http'
token = ''
uri = URI("{token}")
response = Net::HTTP.get(uri)
members = JSON.parse(response)['members']
jamescmartinez /
Created Mar 25, 2016
Because setting up SSH on GitHub shouldn't take 10 pages of tutorials...
ssh-keygen -t rsa -b 4096 -C "YOUR_EMAIL_HERE@EXAMPLE.COM"
pbcopy < ~/.ssh/
jamescmartinez / html5boilerplate.html
Created Mar 17, 2016
Super simple, no frills HTML5 boilerplate!
View html5boilerplate.html
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Hello, World!</title>
<link rel="stylesheet" href="stylesheet.css">
Hello, World!
<script src="javascript.js"></script>
jamescmartinez / slack_delete.rb
Last active Oct 23, 2019
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from into the token quotes at the top of the file.
View slack_delete.rb
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = ( - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
jamescmartinez / snapchat_decrypt.rb
Last active May 27, 2019
Snapchat Image Decrypt - This Ruby script decrypts the blob received from the `bq/blob` endpoint. Many thanks to @kivikakk, @adamcaudill, @tlack, and @NeilHanlon for inspiration, code, guides, and of course, the encryption key.
View snapchat_decrypt.rb
#!/usr/bin/env ruby
require 'openssl'
data ='blob', 'r:ASCII-8BIT').read
c ='AES-128-ECB')
c.key = 'M02cnQ51Ji97vwT4'
o = ''.force_encoding('ASCII-8BIT')
data.bytes.each_slice(16) { |s| o += c.update( }
You can’t perform that action at this time.