Skip to content

Instantly share code, notes, and snippets.

@0xdade
0xdade / ytcracker_gpt2.txt
Last active July 2, 2024 17:29
I wrote a quick script to download lyrics for an artist from Genius and then feed it into GPT2 runs to try to generate the next Friday by Rebecca Black. The robot version of YTCracker raps a lot like a spam version of YTCracker himself. It's pretty amazing.
/*
I wrote a quick script to download lyrics for an artist from Genius and then feed it into GPT2 runs to try to generate the next Friday by Rebecca Black. The robot version of YTCracker raps a lot like a spam version of YTCracker himself. It's pretty amazing.
*/
======== SAMPLE 1 ========
done so just say so
The more I thought about itI could feel the pull of love
Because when it was happening to a girl my eyes rolled
I can't deny this love's a bit raw
But in spite of myself I still pulled back
Originally from: http://erlang.org/pipermail/erlang-questions/2017-August/093170.html
For a safe and fast Erlang SSL server, there's a few
configuration values you might want by default:
[{ciphers, CipherList}, % see below
{honor_cipher_order, true}, % pick the server-defined order of ciphers
{secure_renegotiate, true}, % prevent renegotiation hijacks
{client_renegotiation, false}, % prevent clients DoSing w/ renegs
{versions, ['tlsv1.2', 'tlsv1.1']}, % add tlsv1 if you must
@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@pengkong
pengkong / fcm-gcm-server-boilerplate.php
Last active January 28, 2017 04:25
Google FCM/GCM PHP Server Boilerplate
<?php
$registration_ids = [
'You',
'Only'
];
$data = ['title' => 'Live', 'message' => 'Once!'];
$payload = json_encode([
@Wack0
Wack0 / gist:17c56b77a90073be81d3
Last active July 23, 2021 12:54
It's not just superfish that's the problem.
Superfish uses an SDK from Komodia to do SSL MITM. That's probably known by now.
Superfish isn't the only product to use that sdk. there's others too.
Each product that uses the Komodia SDK to MITM, has its OWN CA cert and private
key pair. Seems a lot of people think they all use the superfish cert. That is
NOT the case.
First thing I checked was komodia's own parental control software,
Keep My Family Secure. (mentioned on komodia's own website).
@buhman
buhman / 00 wpa_cli passphrase network
Last active July 18, 2024 07:46
all wpa_cli ommands can be tab-completed
localhost ~ # cat <<EOF> /etc/wpa_supplicant.conf
ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel
update_config=1
EOF
localhost ~ # wpa_supplicant -iwlp1s0 -Dnl80211 -c/etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
localhost ~ # wpa_cli
wpa_cli v2.0
Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi> and contributors
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active September 5, 2024 20:18
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@andkerosine
andkerosine / raskell.rb
Created August 15, 2012 05:56
Haskell-like list comprehensions in Ruby
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << args.map { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
end
class Array
def +@
@manuel
manuel / dyn-wind-commentary.scm
Created August 11, 2012 12:45
Commenting on Oleg's dyn-wind.scm
;; See http://okmij.org/ftp/continuations/implementations.html#dynamic-wind
;; and http://axisofeval.blogspot.com/2012/08/delimited-continuations-do-dynamic-wind.html
;; Slight trick here: use identity of yield-record-tag function as the actual tag
(define (yield-record-tag) yield-record-tag)
(define (make-yield-record v k)
(list yield-record-tag v k))
;; Yield simply aborts up to the generator's caller, delivering to it
;; the yielded value and the continuation for resuming after the call
func authorized(r *http.Request) bool {
h := r.Header.Get("Authorization")
_, password, err := basicauth.Decode(h)
if err != nil {
return false
}
c := appengine.NewContext(r)
k := datastore.NewKey(c, "Password", "password", 0, nil)
p := new(Password)
if err := datastore.Get(c, k, p); err != nil {