Skip to content

Instantly share code, notes, and snippets.

@tobi
tobi / kindle.rb
Last active September 25, 2022 02:37
Download your Kindle Highlights to local markdown files. Great for Obsidian.md.
#!/usr/bin/env ruby
# gem install active_support
require 'active_support/inflector'
require 'active_support/core_ext/string'
# gem install webrick (only ruby3)
require 'webrick'
# gem install mechanize
@james-huang
james-huang / global_entry_scrapper.py
Last active March 17, 2017 20:46
global entry appointment schedule monitior
"""
This is a script to help James find a global entry appointment before September because
the whole tsa global entry thing is fucked.
To use:
sudo pip install scrapy
scrapy runspider global_entry_scrapper.py
To set up automated email notifications:
select i.full_name industry, widget_accounts, all_customers, round((widget_accounts / all_customers) * 100, 2) perc_accounts_w_widget
from
(
select industry, count(*) all_customers, sum(if(w.widget_ticket_last_7 > 0, 1, 0)) widget_accounts
from accounts a
left outer join
(select t.account_id, max(run_at) max_run_at, sum(t.new_channel_zendesk_widget) widget_ticket_last_7
from tickets t
where run_at between subdate(date(now()), interval 7 day) and date(now())
and t.new_channel_zendesk_widget > 0
@stevebowman
stevebowman / AWSLambdaSimpleSMS.js
Last active June 22, 2023 12:09
AWS Lambda Function to send an SMS message via the Twilio API
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');
@ryansobol
ryansobol / gist:5252653
Last active November 4, 2024 23:06
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 15, 2024 09:51
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@benjaminpearson
benjaminpearson / gist:1102194
Last active March 5, 2016 15:50
Apps for a fresh Mac OS
1password - Password mangager
3hub - Amazon s3 file manager
Adium - Instant messenger
Arq - Amazon s3 backup
Air Server - Send your iPhone/iPad screen to your mac screen for demos
Alfred - Launch bar app (must have)
Base - Sqlite db viewer
Caffeine - Keeps computer awake
Charles - Web debugging proxy
Cornerstone - SVN client