Skip to content

Instantly share code, notes, and snippets.


Charles Watson sircharleswatson

View GitHub Profile
View gist:7f4ff0b14b1861d674e349ef9f2399a9
; generated by Slic3r Prusa Edition 1.41.2+ on 2019-02-22 at 23:23:56
; external perimeters extrusion width = 0.40mm
; perimeters extrusion width = 0.40mm
; infill extrusion width = 0.40mm
; solid infill extrusion width = 0.40mm
; top infill extrusion width = 0.40mm

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View config.exs
use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: :dev
# For a full list of config options for both releases
# and environments, visit
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
;; Base distribution to use. This is a layer contained in the directory
View shrivel.ex
defmodule Shrivel do
def valid?(url) do
regex = "^(?:(?:https?|ftp):\/\/)"
<> "(?:\S+(?::\S*)?@)?"
<> "(?:"
<> "(?!(?:10|127)(?:\.\d{1,3}){3})"
<> "(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})"
<> "(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})"
<> "(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])"
<> "(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}"
View user_registration.feature
Feature: User Registration
As Impatient Ivan
I want to register an account as quickly as possible
So that I can start using the app
Given I am not logged in
View bash_profile
source ~/
####### COLORS #######
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
sircharleswatson / closure.js
Created Nov 25, 2014
Explaining JS closures
View closure.js
// before anything is done to the multiplier function
// it looks like this:
function multiplier(factor) {
return function(number) {
return number * factor;
var twice = multiplier(2);
// Once the multiplier function gets set,
View world_cup.rb
#!/usr/bin/env ruby
require 'json'
require 'httparty'
def get_json(url)
response = HTTParty.get(url)
json = JSON.parse(response.body)
You can’t perform that action at this time.