Skip to content

Instantly share code, notes, and snippets.

View mxbees's full-sized avatar

nina de jesus mxbees

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mxbees on github.
  • I am mxbees (https://keybase.io/mxbees) on keybase.
  • I have a public key whose fingerprint is DE82 9213 8EA3 A512 6953 6E42 2626 8304 BBC2 8B8B

To claim this, I am signing this object:

@mxbees
mxbees / mkgif.sh
Created October 10, 2017 16:43
A little script I use for making gifs.
#!/bin/bash
for i in "$@"
do
case $i in
-f=*)
frames=$(echo "${i#*=}")
shift
;;
-w=*)
@mxbees
mxbees / archive-bookmark.sh
Last active August 20, 2016 17:22
A script for saving a webpage to the Internet Archive and then bookmarking that page in Pinboard.
#!/bin/bash
#script requires a pinboard account
#also the '.pinboardcfg' is where i store my $api_token and $generic_oauth
. ~/.my-config/.pinboardcfg
auth_token='?auth_token='
base_url="https://api.pinboard.in/v1"
wget_cmd="wget -q -O -"
@mxbees
mxbees / CLI tweet threads
Last active July 30, 2016 16:22
Two bash scripts for commandline tweet threading.
#These are two scripts I use for creating tweet threads from the commandline.
#These rely on a rubygem, 't'. https://github.com/sferik/t which needs to installed for these scripts to work.
#first script is for tweeting, I have bash alias 'tt' that invokes this script. Its name 'tt.sh' on my machine
#!/bin/bash
t update "$1" | tail -n 1 | sed 's/Run\ `t\ delete\ status\ //' | sed 's/`\ to\ delete\.//' > /tmp/tweetid.txt
#second script is for taking the tweetid saved in /tmp/tweetid.txt file. You can obviously change where this
#file is saved. I call it 'tre.sh' and the bash alias is 'tre'.
@mxbees
mxbees / extract-data-from-twitter.sh
Created October 31, 2015 18:45
extracts data from your twitter archives (the js files, not the csv)
#!/bin/bash
#this script requires 'jq' to be installed (for CLI json parsing). https://stedolan.github.io/jq/
#this assumes that this script is called within the directory that you unzipped your twitter archive
file=data/js/tweets/*
#iterate over each file in dir
for f in $file
do
#!/bin/ruby
require 'open-uri'
require 'uri'
require 'json'
require 'rubygems'
#This is for iterating over every .js file in dir. It also assumes you're running the script in the same directory where you unzipped the twitter archive.
Dir.glob('data/js/tweets/*.js') do |x|
#Opens the .js file and ignores the first line.
@mxbees
mxbees / download-images-from-tumblr.rb
Last active October 31, 2015 19:58
this ruby script takes txt file of image post URLs and downloads the images.
#!/bin/ruby
require 'open-uri'
require 'tumblr_client'
require 'json'
require 'uri'
#this takes the txt file with the photo post URLs where you're grabbing the pics from.
file = ARGV
@mxbees
mxbees / gist:52832bb97ad2873756fb
Created March 6, 2015 15:38
force-unfollow.sh
#!/bin/bash
#this script requires 't', a ruby gem for twitter.
# https://github.com/sferik/t.git
# gem install t
t followers > followers.txt
while read line
do
@mxbees
mxbees / carrot-ginger-soup.md
Created October 4, 2014 16:21
Carrot Ginger Soup

##Ingredients

  • 3 Tbsp unsalted butter
  • 1 yellow onion, diced (2 small)
  • 1/4 cup fresh ginger, minced
  • 4 cups chopped and peeled carrots (about 1 1/2 pounds)
  • 4 cups vegetable broth
  • 1/2 cup of coconut milk
  • dash nutmeg
  • 1 tsp basil
@mxbees
mxbees / get-teh-clip.sh
Created July 5, 2014 11:44
clip movies
#!/bin/bash
echo "file name"
read name
#both the 'start' and 'end' variables should be time stamps of the format hh:mm:ss
echo "start of clip"
read start
echo "end of clip"