Skip to content

Instantly share code, notes, and snippets.

View dja's full-sized avatar

Daniel Jacob Archer dja

View GitHub Profile
@NogaMan
NogaMan / .dockerignore
Last active August 17, 2021 04:59
Gatsby Dockerfile
.cache/
node_modules/
public/
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@alanwill
alanwill / s3-bucket-move
Created December 5, 2015 20:27
Move an S3 bucket to a different region
aws s3 sync s3://oldbucket s3://newbucket --source-region us-west-1 --region us-west-2

#Simple Theos Setup Instructions

Add the following to ~/.bash_profile (create the file if it does not exist by typing touch ~/.bash_profile into terminal. The touch command simply creates a file if it does not exist):

export THEOS=/opt/theos
export PATH=$THEOS/bin:$PATH
export THEOS_DEVICE_IP=your_idevice_ip THEOS_DEVICE_PORT=22
@MadLittleMods
MadLittleMods / jquery-parent-to-animate.js
Last active June 4, 2021 11:52
Transition/Animate move to new parent - jQuery plugin
// Usage:
// $('.box').parentToAnimate($('.new-parent'), 200);
// $('.box').parentToAnimate($('.new-parent'), 'slow');
// $('.box').parentToAnimate('.new-parent', 'slow');
jQuery.fn.extend({
// Modified and Updated by MLM
// Origin: Davy8 (http://stackoverflow.com/a/5212193/796832)
parentToAnimate: function(newParent, duration) {
duration = duration || 'slow';
@pincheira
pincheira / homebrew.rb
Last active July 1, 2016 17:07
Working version of Homebrew for OS X 10.10

Working version of Homebrew for OS X 10.10

The only way to get working Homebrew on OS X 10.10 for now (10.10 beta was just released a couple of hours ago) is by using an special fork by @jacknagel available at https://github.com/jacknagel/homebrew/tree/rb2.

To install this working version of Homebrew just execute:

ruby -e "$(curl -fsSL https://gist.githubusercontent.com/jpincheira/bd3698fee46735fac252/raw/2c6a2f81927871c1a64e2dfbbc5eef451c71a9ac/homebrew.rb)"

@tulios
tulios / embedded_svg_helper.rb
Last active May 16, 2020 08:12
embedded_svg helper for Rails
module ApplicationHelper
# Using raw files
def embedded_svg filename, options = {}
root = options[:root] || Rails.root.join("app", "assets", "svgs")
file = File.read(File.join(root, filename))
doc = Nokogiri::HTML::DocumentFragment.parse file
svg = doc.at_css 'svg'
svg['class'] = options[:class] if options[:class].present?
doc.to_html.html_safe
end
@brycesenz
brycesenz / customer_serializer.rb
Last active October 22, 2020 07:42
Rspec tests & helpers for ActiveModel::Serializers
# app/serializers/customer_serializer_spec.rb
class CustomerSerializer < ActiveModel::Serializer
attributes :customer_number, :email, :username
def customer_number
object.account_number
end
def merchant_id
@gruber
gruber / make_bookmarklet.pl
Last active May 5, 2024 21:11
JavaScript Bookmarklet Builder
#!/usr/bin/env perl
#
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8);
use open IO => ":utf8", # UTF8 by default
":std"; # Apply to STDIN/STDOUT/STDERR
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.