Skip to content

Instantly share code, notes, and snippets.

View mxlje's full-sized avatar
🌩️

Max Lielje mxlje

🌩️
View GitHub Profile
let BlogAuthor = new GraphQLObjectType({
name: 'Author',
fields: () => ({
id: { type: GraphQLString },
name: { type: GraphQLString }
})
})
let BlogArticle = new GraphQLObjectType({
name: 'Article',
@mxlje
mxlje / Rakefile
Created July 19, 2015 11:16
secrets for rake tasks
require 'yaml'
task :deploy do
# add check if file exists etc
keys = YAML::load(File.open('keys.yml'))
token = keys['token']
secret = keys['secret']
# add check for empty values etc
@mxlje
mxlje / ssl.md
Last active January 10, 2022 02:03
SSL Certificate Commands

These commands are needed every time you want to generate a new certificate signing request to give to an authority in order for them to generate and sign a certificate for you.

https://letsencrypt.org/ solves a lot of the pain involved with SSL certs, but sometimes you still need to go the "old school" route. I constantly forget how this stuff works, so I collected the most important commands (and what they do) here for easy copy & paste.

Generate new private key

@mxlje
mxlje / docker_commands.md
Last active August 29, 2015 14:20
Useful Docker commands

Remove all exited containers

sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm

Compile with golang-builder

CenturyLinkLabs/golang-builder

var valid_email = /[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;
[BUG] Segmentation fault at 0x00000000000000
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
@mxlje
mxlje / gist:3b8401d8fe8e2cc5c0fd
Created October 21, 2014 11:27
Poolside.fm Song URLs
2014-08-13
https://soundcloud.com/braxe1/3-voices
https://nextpreview.soundcloud.com/futureclassic/touch-sensitive-pizza-guy-3
https://soundcloud.com/foolsgoldrecs/grown-up-explicit
https://soundcloud.com/bondax/no-diggity
https://soundcloud.com/lordrecollectif/vanderway-early
https://soundcloud.com/electrocookie/metric-help-im-alive-the-twelves-remix
https://soundcloud.com/timsweeney/paradisbisrecords
https://soundcloud.com/itsindoorsoutdoors/cruiser-kidnap-me
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=47 time=145.805 ms
64 bytes from 8.8.8.8: icmp_seq=0 ttl=47 time=146.030 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=1 ttl=47 time=84.042 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=47 time=84.503 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=2 ttl=47 time=76.905 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=47 time=76.950 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=3 ttl=47 time=105.836 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=47 time=105.844 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=4 ttl=47 time=24.337 ms
@mxlje
mxlje / id
Created August 2, 2014 15:49
Random ID TextExpander snippets
#!/usr/bin/env ruby
print `uuidgen`.downcase.split("-").take(2).join