This file contains 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
package main | |
import ( | |
"net/http" | |
"time" | |
"golang.org/x/time/rate" | |
) | |
// ThrottledTransport Rate Limited HTTP Client |
This file contains 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
package main | |
// #include <stdlib.h> | |
// #include "wrapper.c" | |
import "C" | |
import "unsafe" | |
import "fmt" | |
func read(filename string) string { | |
f := C.CString(filename) |
This file contains 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
$ ssh-keygen -l -f /path/to/keys/id_rsa.pub | |
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA) |
This file contains 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
------------------------------------------------------------------- | |
--Hammerspoon config to replace Cinch & Size-up (Microsoft Windows style) window management for free | |
--By Jayden Pearse (spartanatreyu) | |
--Sort of messy, forgive me. Never scripted in lua before | |
------------------------------------------------------------------- | |
------------------------------------------------------------------- | |
--Options, feel free to edit these | |
------------------------------------------------------------------- |
This file contains 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
// Copyright (C) 2011 by Christoph Hack. All rights reserved. | |
// Use of this source code is governed by the New BSD License. | |
/* | |
This program contains a simple micro-benchmark for a Disruptor [1] like | |
event buffer (or at least what I think that Disruptor might be). There | |
isn't any kind of API yet and this test is currently limited to a | |
single producer - single consumer architecture, but generally the | |
architecture of Disruptor is also well suited for multiple producers and | |
consumers. |
This file contains 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
│ File: .zsh/includes/cleanup.sh | |
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────── | |
1 │ cleanup () { | |
2 │ find ~/src -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
3 │ find ~/src -name '.next' -type d -prune -exec rm -rf '{}' + | |
4 │ cargo sweep -r -t 30 ~/src | |
5 │ brew cleanup | |
6 │ is_bin_in_path docker && docker system prune -a -f --volumes || echo "skipping docker" | |
7 │ } | |
8 │ # https://stackoverflow.com/questions/6569478/detect-if-executable-file-is-on-users-path |
This file contains 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
package main | |
import "fmt" | |
// WithPrefix | |
type prefixOption struct{} | |
func WithPrefix() interface { | |
GetOption |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"net/http" | |
"github.com/asaskevich/govalidator" | |
) |
This file contains 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
class User | |
include DataMapper::Resource | |
property :id, Serial | |
property :username, String, :required => true, :unique => true | |
property :address_street_address, String | |
property :address_location, String | |
property :address_subdivision, String | |
property :address_country, String |
NewerOlder