Skip to content

Instantly share code, notes, and snippets.

View netshade's full-sized avatar
🧛

Chris Zelenak netshade

🧛
View GitHub Profile
@netshade
netshade / install.sh
Created June 1, 2015 20:54
Chef Omnibus Installer w/ Gentoo Support
#!/bin/sh
if ! which chef-solo; then
if [ -e "/etc/gentoo-release" ]; then
mkdir -p /usr/portage
emerge --sync
emerge --oneshot portage
emerge -C perl-core/Module-Metadata
emerge -C perl-core/Parse-CPAN-Meta
emerge -C lang-dev/perl
emerge perl
@netshade
netshade / nodejs_example.js
Created October 20, 2015 14:50 — forked from illbzo1/nodejs_example.js
An example Node.js implementation for DocRaptor, that does not rely on any external dependencies.
var https = require("https"),
fs = require("fs");
var payload = JSON.stringify({
user_credentials: "YOUR_API_KEY_HERE",
doc: {
document_content: "<!DOCTYPE html><html><head><title>Javascript PDF Sample</title></head><body>Hello from Javascript!</body></html>",
name: "test.pdf",
document_type: "pdf",
test: true
@netshade
netshade / gist:0dad5fde984e8196cb6da90a66ce6883
Created April 21, 2016 01:32
Why does requesting a URL from a Google App Engine frontend with "Connection: close" show an SSLRead() error on Mac OS X
curl -H "Connection: close" -vvv "https://www.khanacademy.org/humanities/art-history-basics" > /dev/null
@netshade
netshade / wtf.rb
Last active June 29, 2016 14:22
wtf
irb(main):001:0> h = Hash.new(Hash.new(0))
=> {}
irb(main):002:0> h[:foo][:bar] += 1
=> 1
irb(main):003:0> h
=> {}
irb(main):004:0> h.empty?
=> true
irb(main):005:0> h[:foo]
=> {:bar=>1}
@netshade
netshade / frame_decoder.c
Created February 2, 2022 19:04
Godot GDNative FFMPEG Streaming
#include <gdnative_api_struct.gen.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libavformat/avformat.h>
#include <libavutil/imgutils.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@netshade
netshade / README.md
Last active May 10, 2022 16:24
Installing Mongo DB 2.6 on Big Sur
  1. Download MongoDB for Mac OS
  2. Extract the contents of the tgz file to /usr/local/mongo ( or wherever )
  3. Create a new launch plist with the following content at /Library/LaunchDaemons/com.mongo.db.plist (take note that you will need to change the User Name value in the below plist):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>com.mongo.db</string>
@netshade
netshade / index.html
Last active September 26, 2022 20:11
Open311 HTML - JS Test Harness
<!DOCTYPE html>
<html>
<head>
<title>Open311 Test Client</title>
<style>
html {
max-width: 140ch;
padding: 3em 1em;
margin: auto;
line-height: 1.75;
@netshade
netshade / SConstruct
Created February 22, 2024 19:29
frame_decoder SConstruct
#!python
import os, subprocess
opts = Variables([], ARGUMENTS)
# Define the relative path to the Godot headers.
godot_headers_path = "../godot-headers/"
# Gets the standard flags CC, CCX, etc.
env = DefaultEnvironment()