Skip to content

Instantly share code, notes, and snippets.


Sam Figueroa unimatrixZxero

Block or report user

Report or block unimatrixZxero

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
Ewpratten / hosts-yt-ads
Last active Mar 22, 2020
youtube ads hosts file
View hosts-yt-ads
bishboria /
Last active Apr 7, 2020
Springer made a bunch of books available for free, these were the direct links
bignimbus / .vimrc
Last active Mar 30, 2020
Set iTerm2 title to current buffer in vim
View .vimrc
" Set the title of the Terminal to the currently open file
function! SetTerminalTitle()
let titleString = expand('%:t')
if len(titleString) > 0
let &titlestring = expand('%:t')
" this is the format iTerm2 expects when setting the window title
let args = "\033];".&titlestring."\007"
let cmd = 'silent !echo -e "'.args.'"'
execute cmd
kentcdodds / gist:31c90402750572107922
Last active Sep 24, 2019
Get Watchers of element and its children
View get-watchers.js
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope($isolateScope);
var scopeWatchers = getWatchersFromScope($scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));
View example_feature_spec.rb
around { |example| with_wait_time(6) { } }
staltz /
Last active Apr 8, 2020
The introduction to Reactive Programming you've been missing
#!/usr/bin/env python
# ./ rownumber output.png
# This is meant to be hyper-simple and makes
# some assumptions like: you want a row (not
# a column), the video is RGB (not gray), etc.
# Bug: frame_count is sometimes fractional.
# int() and the "if not okay" are workarounds.
View untrusted-lvl10-solution.js
* ambush.js *
* Oh. Oh, I see. This wasn't quite part of the plan.
* Looks like they won't let you take the Algorithm
* without a fight. You'll need to carefully weave your
* way through the guard drones.
mockdeep / spec_helper.rb
Last active Oct 7, 2019
A spec helper file for managing database cleaner configuration
View spec_helper.rb
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara/rspec'
RSpec.configure do |config|
config.use_transactional_fixtures = false
config.treat_symbols_as_metadata_keys_with_true_values = true
View exponential_backoff.rb
module ExponentialBackoff
def self.retry_with_exponential_backoff *args
opts = { max: 3 }
opts.merge!(args.pop) if args.last.is_a?(Hash)
attempt = 0
rescue *args
if attempt < opts[:max]
attempt += 1
You can’t perform that action at this time.