Skip to content

Instantly share code, notes, and snippets.

View sircharleswatson's full-sized avatar

Charles Watson sircharleswatson

View GitHub Profile
; 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
@sircharleswatson
sircharleswatson / .spacemacs
Created November 14, 2015 22:23
spacemacs dotfile
;; -*- 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
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@sircharleswatson
sircharleswatson / config.exs
Created December 6, 2016 19:18
distillery info
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 https://hexdocs.pm/distillery/configuration.html
@sircharleswatson
sircharleswatson / shrivel.ex
Created November 12, 2015 18:01
url_validation
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}"
Feature: User Registration
As Impatient Ivan
I want to register an account as quickly as possible
So that I can start using the app
Background:
Given I am not logged in
@dev
source ~/.git-prompt.sh
####### 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
sircharleswatson / closure.js
Created November 25, 2014 04:30
Explaining JS closures
// 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,
#!/usr/bin/env ruby
require 'json'
require 'httparty'
BASE_URL = "http://worldcup.sfg.io/"
def get_json(url)
response = HTTParty.get(url)
json = JSON.parse(response.body)