Skip to content

Instantly share code, notes, and snippets.

View h4ck3rm1k3's full-sized avatar

James Michael DuPont h4ck3rm1k3

View GitHub Profile
@bnoordhuis
bnoordhuis / punycode.py
Created June 20, 2011 16:31
python punycode encoder and decoder
#!/usr/bin/env python
#
# Copyright (C) 2011 by Ben Noordhuis <info@bnoordhuis.nl>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@andrewharvey
andrewharvey / bboxfilter.pl
Created August 16, 2011 12:43
XSL to convert http://api.fosm.org/api/0.6/changesets into an Atom/GeoRSS feed
#!/usr/bin/perl -wT
# This script uses XML::Atom::Filter to filter an existing FOSM recent changes
# feed given a query bbox based on the georss:box for each entry in the feed
#
# Ideally we would implement it on the server for /feed to return the static
# atom feed from disk, and /feed?bbox to call this CGI script.
#
# This script is licensed CC0 by Andrew Harvey <andrew.harvey4@gmail.com>
#
@h4ck3rm1k3
h4ck3rm1k3 / capwiz automation
Created March 2, 2012 15:28
automate usage of capwiz
use strict;
use warnings;
use WWW::Mechanize;
use LWP::Debug qw(+);
use YAML;
my $subject;
my $body;
@andrewharvey
andrewharvey / stops2osm.pl
Created September 5, 2012 11:06
gtfs2osm - simple perl scripts to convert GTFS data into .osm files.
#!/usr/bin/perl -w
# This script converts a GTFS stops.txt into an OSM file.
#
# To the extent possible under law, the person who associated CC0
# with this work has waived all copyright and related or neighboring
# rights to this work.
# http://creativecommons.org/publicdomain/zero/1.0/
use strict;
@richard-flosi
richard-flosi / bottle-cors.py
Created September 26, 2012 16:55
Bottle with Cross-origin resource sharing (CORS)
"""
Example of setting up CORS with Bottle.py.
"""
from bottle import Bottle, request, response, run
app = Bottle()
@app.hook('after_request')
def enable_cors():
"""
@jefftriplett
jefftriplett / feeds.csv
Created October 10, 2013 18:10
rss feed finder for open lawrence
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
http://amyklamet.com/rss.php
http://archaeology.biodiversity.ku.edu/rss.xml
http://computation.llnl.gov/rss.xml
http://dhumc.com/site/feed/
http://finalfridayslawrence.wordpress.com/feed/
http://freestateflyfishers.org/feed/
http://heritagebaptistchurch.cc/wp-content/plugins/nextgen-gallery/xml/media-rss.php
http://kansaspublicradio.org/index.php?format=feed&type=atom
http://kansaszencenter.org/?feed=rss
http://lawrenceartscenter.org/comments/feed/
@karpathy
karpathy / min-char-rnn.py
Last active July 24, 2024 18:36
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@gwpl
gwpl / Errors Before Downgrading jemalloc.md
Last active May 25, 2019 22:12
2017-12-17 Daedalus on ArchLinux - building notes by Grzegorz Wierzowiecki

To easy finding this gist Let me put here links that suggested me to downgrade jemalloc to resolve my issues:

plus how issues looked like to easy finding in search engines:

$ pacaur -S daedalus-bridge  # same for pacaur -S cardano-sl
@p-alik
p-alik / cli requests to cardano-sl api
Last active September 10, 2020 07:36
list accounts, list wallet transactions history
# https://cardanodocs.com/technical/wallet/api/
# create a new wallet
$ curl -H "Content-Type: application/json" --cacert cardano-sl/scripts/tls-files/ca.crt https://localhost:8090/api/wallets/new -d '{
"cwInitMeta": {
"cwName": "my-cardano-wallet",
"cwAssurance": "CWAStrict",
"cwUnit": 0
},
"cwBackupPhrase": {