Here's what I do when I publish an NPM package.
I always like to check what's going on in a repo before I do anything:
I am the owner of lvh.me. And I'm glad to hear it's helpful. In truth, it's just a fancy DNS trick. lhv.me and all of it's sub-domains just point back to your computer (127.0.0.1). That means running ssl is as simple (or difficult) as running ssl on your computer. | |
I'm not sure how comfortable you are with the command line, but here's my how I setup my development environment. (rvm, passenger, nginx w/ SSL, etc). | |
# Install rvm (no sudo!) | |
# ------------------------------------------------------ | |
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
source ~/.rvm/scripts/rvm | |
rvm install ree-1.8.7-2010.02 |
require "rubygems" | |
require "octokit" # gem install octokit | |
1.upto(5) do |page| | |
Octokit.repositories("railscasts", page: page, per_page: 100).each do |repo| | |
system "git clone git://github.com/railscasts/#{repo.name}" | |
end | |
end |
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Playing Around with the Command Bus Pattern in Python | |
""" | |
import inspect | |
import collections | |
// Native selectors. | |
(function(window, document) { | |
'use strict'; | |
var noop = function() { | |
}; | |
// DOCUMENT LOAD EVENTS | |
// not needed at the bottom of the page | |
document.addEventListener('DOMContentLoaded', noop); |
Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.
cherry-pick
does support a range of commits, but if you have merge commits in that range, it gets really complicated
git checkout branch-B
git cherry-pick X
git cherry-pick Y
I use PostgreSQL via the psql client. If you use a different client (eg. pgAdmin, etc.), I don't know how much will translate over.
One nice difference between psql and mysql (cli) is that if you press CTRL+C, it won't exit the client.
psql -U postgres
#------------------------------------------------------------------------------ | |
# Top 20K hashes from the Troy Hunt / haveibeenpwned Pwned Passwords list v2 (2018-02-21) | |
# with frequency count and cracked plaintext passwords | |
# | |
# The latest version of this file can be found here: | |
# https://gist.github.com/roycewilliams/281ce539915a947a23db17137d91aeb7 | |
# | |
# NOTE: THIS FILE IS DEPRECATED. | |
# The equivalent of this file, but based on v6 of the Pwned Passwords, is here: | |
# https://gist.github.com/roycewilliams/226886fd01572964e1431ac8afc999ce |
I was looking for a way to revert data deleted by mistake from the Django admin.
I reverse-engineered how Django's admin builds the list of objects displayed on the "Are you sure?" confirmation page.
Given a single obj
or list of objs
, the script included in this gist will:
NestedObjects
utility to determine the objects that would be deleteddeleted-objects
fixtureThis is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project: