Skip to content

Instantly share code, notes, and snippets.

View benarent's full-sized avatar
💼

Ben Arent benarent

💼
View GitHub Profile
@gr2m
gr2m / html_slicing_overlay.css
Created September 6, 2011 21:40
best HTML slicing helper ever: show the reference design as non-blocking overlay. Webkit-Browser only.
/* =============================================================================
show the reference design as non-blocking overlay.
NOTE: Webkit-Browser only. Reference image needs to be flipped as
»box-reflect: right« & transform: scaleX(-1) do not play together.
========================================================================== */
body:after {
content: '';
display: block;
@jamtur01
jamtur01 / generate_navigation.rb
Created May 20, 2012 21:28
Auto-generates navigation menu for Jekyll sites using pages based on subdirectories and contents
# Auto-generates navigation
# {% generate_navigation %}
#
require 'pathname'
module Jekyll
class Page
def source_path
File.join(@dir, @name).sub(%r{^/*},'')
/**
* This casper scipt checks for 404 internal links for a given root url.
*
* Usage:
*
* $ casperjs 404checker.js http://mysite.tld/
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42
*/
/*global URI*/
@afeld
afeld / gist:4539970
Last active December 11, 2015 03:48
Jux: emails from Airbrake
# We had introduced a bug that was causing user registration errors in Rails for certain email addresses.
# Fetch the list of unique emails that had failed registration (that produced a particular exception).
require 'open-uri'
require 'nokogiri'
require 'set'
AUTH_TOKEN = 'XXX'
ERROR_ID = '54425478'
@yannvery
yannvery / CHRUBY_add_ruby_version.md
Last active December 8, 2023 00:51
CHRUBY - How to install a new ruby version

Install a new ruby version with chruby

OSX

First of all you must update ruby-build to update definitions list.

brew update

And update ruby-build

@ELLIOTTCABLE
ELLIOTTCABLE / .gitignore
Last active July 14, 2023 15:34 — forked from rosston/.gitignore
BASH Script to keep Route53 updated with your current external IP address
*.ip
*.log
@Zate
Zate / get_go.sh
Last active February 5, 2024 18:19
Shell script to download and install latest golang
#! /bin/bash
# [get_golang.sh](https://gist.github.com/n8henrie/1043443463a4a511acf98aaa4f8f0f69)
# Download latest Golang release for AMD64
# https://dl.google.com/go/go1.10.linux-amd64.tar.gz
set -euf -o pipefail
# Install pre-reqs
sudo apt-get install python3 git -y
o=$(python3 -c $'import os\nprint(os.get_blocking(0))\nos.set_blocking(0, True)')
@physhster
physhster / USG WPA Supplicant Config for AT&T Fiber
Last active April 15, 2024 23:21
Complete-ish guide to WPA Supplicant bypass on AT&T U-verse Fiber with Unifi USG
*Important note to pay attention to*
You'll most likely use eth0 on a USG and eth2 or eth3 on a USG-Pro, edit the files accordingly. Do not run the supplicant on virtual interfaces (e.g. eth0.0), as it will not work.
*Pre-requisites*
Get certs, run the mfg_dat_decode tool. You should end up with 3 certs: CA_*.pem, Client_*.pem and PrivateKey_PKCS1_*.pem, as well as a a wpa_supplicant.conf file
In the archive generated by the tool, edit wpa_supplicant.conf to add the full path /config/auth/ to all 3 files:
network={
ca_cert="/config/auth/CA_xxxxxx.pem"
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
@zmb3
zmb3 / cloud-config.yaml
Created February 3, 2022 16:49
Multipass Candidate Review
packages:
- git
- wget
- build-essential
- tree
- protobuf-compiler
runcmd:
- [ wget, https://go.dev/dl/go1.17.5.linux-arm64.tar.gz ]
- [ sudo, tar, -C, /usr/local, -xzf, /go1.17.5.linux-arm64.tar.gz ]