Skip to content

Instantly share code, notes, and snippets.

View KelseyDH's full-sized avatar

Kelsey Hannan KelseyDH

  • Bite Interactive
  • Vancouver
View GitHub Profile
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @grant none
// @version 1.9.1
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
// @downloadURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
...
##
# Until this commit is merged and released by rack
#
gem 'rack', git: 'https://github.com/rack/rack.git', ref: 'c859bbf7b53cb59df1837612a8c330dfb4147392'
...
@sahava
sahava / allowlinker-ga.js
Last active December 29, 2023 09:11
This script reproduces Google Analytics' allowLinker plugin, resulting in a function that returns true if the linker parameter in the URL is valid and false otherwise. Uses the "old" linker plugin format. You can also pass a string as an argument to check if that string is a valid linker parameter.
var checkLinker = function(str) {
// First browser fingerprint method.
// Uses the clientId / gid string, user agent, time, and browser plugin descriptions.
var joiner = function (cidGid, offset) {
var a = new Date,
b = window.navigator,
c = b.plugins || [];
var d = [cidGid, b.userAgent, a.getTimezoneOffset(), a.getYear(), a.getDate(), a.getHours(), a.getMinutes() + offset];
for (var e = 0; e < c.length; ++e) {
@ilnurnasyrov2
ilnurnasyrov2 / imgur.rb
Created February 6, 2018 16:45
Sample of imgur api usage
require "httparty"
require "base64"
# Put there your client id
client_id = "..."
binary_file = IO.read("image.jpg");
base64_encoded_file = Base64.encode64(binary_file);
response = HTTParty.post(
@tombigel
tombigel / README.md
Last active May 6, 2024 03:23 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@ramonrails
ramonrails / puma-dev.sh
Last active September 10, 2020 18:14
puma-dev management script
#!/bin/bash
# author: ramonrails.in
# version: 1.0
# release date: 7-Aug-2017
# license: MIT
# style for output
bold=$(tput bold)
cyan=$(tput setaf 6)
@plutoegg
plutoegg / TetherToken.sol
Last active November 4, 2023 09:18
TetherToken.sol - Tether.to USD
pragma solidity ^0.4.11;
/**
* Math operations with safety checks
*/
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
@brunofacca
brunofacca / rails_api_token_auth_with_tiddle.md
Last active October 13, 2023 00:55
Rails API token authentication with Tiddle gem in apps with web views

This gist attempts to explain how to implement token authentication in Rails, using Devise and Tiddle. Tiddle was designed to provide token auth for API-only Rails apps. However, the following instructions will enable you to use it in Rails apps which have both APIs and web views.

##Why Tiddle?

Devise is the obvious choice for authentication on Rails. However, token authentication was

anonymous
anonymous / -
Created November 6, 2015 04:02
gicof() {
git co $( (git branch -r | sed 's/origin\///'; git branch) | sort | uniq | fzf --query="$1" --select-1 --exit-0 )
}
gimf() {
git merge $( (git branch -r | sed 's/origin\///'; git branch) | sort | uniq | fzf --query="$1" --select-1 --exit-0 )
}
@solnic
solnic / anima_vs_virtus.rb
Last active December 11, 2017 23:33
Anima + Transproc vs Virtus
require 'anima'
require 'transproc'
require 'virtus'
require 'benchmark/ips'
USERS = 1000.times.map { |i| { id: "#{i+1}", name: "User #{i+1}", age: "#{(i+1)*2}" } }
module Mappings