Skip to content

Instantly share code, notes, and snippets.

View philfreo's full-sized avatar

Phil Freo philfreo

View GitHub Profile
@leonardofed
leonardofed / README.md
Last active May 3, 2024 01:24
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@tbveralrud
tbveralrud / submodule-update-fix-snippet.yml
Created January 21, 2016 00:20
(Temporary) Fix for submodule update error on CircleCI
# CircleCI failed to build a git submodule update step.
# Tracked it down to partially complete .git/modules existing in our source cache.
# This removes the .git/modules directory before the submodule update.
# The error:
# $ git submodule update --init
# git submodule update --init returned exit code 128
# fatal: Not a git repository: ../.git/modules/<project> Action failed: git submodule update --init
checkout:
@philfreo
philfreo / README.md
Last active August 8, 2016 02:29
SSL CSR & localhost self-signing

Generate a CSR for production use:

openssl req -nodes -newkey rsa:2048 -sha256 -keyout mysite-ssl.private-key.pem -out mysite-ssl.csr -subj '/C=US/ST=California/L=Palo Alto/O=My Company Inc./CN=*.example.com'

Generate a long-lasting self-signed cert & trust it for localhost development usage:

openssl req -nodes -newkey rsa:2048 -sha256 -x509 -days 3650 -keyout selfsigned.key -out selfsigned.crt -subj '/C=US/ST=Anywhere/L=Anywhere/O=Localhost/CN=local.example.com'
@xjamundx
xjamundx / blog-webpack-2.md
Last active April 21, 2024 16:20
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@greglu
greglu / check-reserved-instances
Created July 3, 2015 07:06
Checks reserved instance utilization of an EC2 account
#!/bin/bash
# Checks active, non-spot, EC2 instances against the list reserved instances
# in order to determine which availability-zone/instance-type combinations
# are paying for on-demand prices (that could benefit from reserved instance
# purchase), or current reservations that aren't being used.
#
# Dependencies:
# * awscli (http://aws.amazon.com/cli/)
# * jq (http://stedolan.github.io/jq/)
@thomasst
thomasst / migrate-redis.py
Created May 14, 2015 18:26
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@oysteinjakobsen
oysteinjakobsen / gist:44a2c87bb552871bec71
Last active December 15, 2022 13:23
How install Docker on Raspberry Pi 2

Would you love to get Docker up and running on you Raspberry Pi 2? Fortunately someone already did most of the leg work for you, as you will see from the article "Kick-Ass Raspberry Pi 2 having a forbidden love affair with Docker 1.4.1".

Check the official article "Installing Operating System Images" for more information on how to install this Debian Wheezy OS.

After you have downloaded and installed the image referenced in the article you're ready to do some adjustments to improve security.

Create a user

Log in as root to create a personal user and give it a password: