# clone into the appropriate place in your $GOPATH
git clone git@gist.github.com:63cb64e5217beab99342e4b0aea9551f.git
# change into the buggy project
cd 63cb64e5217beab99342e4b0aea9551f
# generate a client package
"$GOPATH/bin/goagen" -o . -d gist.github.com/63cb64e5217beab99342e4b0aea9551f client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Liquid tag for rendering Rouge CSS | |
| # | |
| # Usage: | |
| # {% rouge_css <theme> [mode] %} | |
| # | |
| # Examples: | |
| # {% rouge_css github %} | |
| # {% rouge_css base16 light %} | |
| class RougeCss < Liquid::Tag | |
| def initialize(tag_name, args, tokens) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| recent = !git for-each-ref refs/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset)|%(color:bold green)%(committerdate:relative)%(color:reset)|%(contents:lines=1)|%(color:magenta)%(authorname)%(color:reset)' --count 100 --sort=-committerdate | column -ts '|' | less -SXRF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| import json, sys, urllib2 | |
| from subprocess import call | |
| request_headers = { | |
| "Authorization": "Bearer ..." | |
| } | |
| request = urllib2.Request("https://.../api/info/queue", headers=request_headers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.6-alpine | |
| RUN gem install kramdown && \ | |
| rm -R /usr/local/bundle/gems/kramdown-1.17.0/test/ && \ | |
| rm -R /usr/local/bundle/gems/kramdown-1.17.0/doc/ && \ | |
| rm -R /usr/local/bundle/cache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def doit | |
| type_map = { | |
| BSON::ObjectId => 'string', | |
| Time => 'date', | |
| Object => 'reference', | |
| Hash => 'map', | |
| Integer => 'integer', | |
| DateTime => 'Date', | |
| String => 'string', | |
| Array => 'array', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Peter Prettenhofer <peter.prettenhofer@gmail.com> | |
| # Olivier Grisel <olivier.grisel@ensta.org> | |
| # Mathieu Blondel <mathieu@mblondel.org> | |
| # Lars Buitinck | |
| # License: BSD 3 clause | |
| from __future__ import print_function | |
| import re | |
| import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const crypto = require('crypto'); | |
| const rawCookie = 'raw-cookie-contents'; | |
| class SessionReader { | |
| constructor({ | |
| secret_key_base, | |
| salt, | |
| iterations, | |
| keylen, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'zlib' | |
| module RImage | |
| class InvalidSignature < Exception | |
| end | |
| class InvalidChecksum < Exception | |
| end | |
| class RImage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| private_key=$(grep PrivateKey "$1" | cut -d ' ' -f 3 | awk '{$1=$1;print}') | |
| public_key=$(grep PublicKey "$1" | cut -d ' ' -f 3 | awk '{$1=$1;print}') | |
| allowed_ips=$(grep AllowedIPs "$1" | cut -d ' ' -f 3 | awk '{$1=$1;print}') | |
| address=$(grep Address "$1" | cut -d ' ' -f 3 | awk '{$1=$1;print}') | |
| endpoint=$(grep Endpoint "$1" | cut -d ' ' -f 3 | awk '{$1=$1;print}') | |
| echo $private_key | |
| echo $public_key |