Skip to content

Instantly share code, notes, and snippets.

@moollaza
moollaza / WordCount.pm
Last active March 26, 2017 19:39
DuckDuckHack Webcast - Making a "Wordcount" Goodie Instant Answer with JavaScript & Templates
package DDG::Goodie::WordCount;
use DDG::Goodie;
use strict;
zci answer_type => 'word_count';
zci is_cached => 1;
triggers start => 'word count', 'wordcount', 'how many words in';
@connerbrooks
connerbrooks / plan9.md
Last active April 8, 2017 16:47
Using Plan9
@nukemberg
nukemberg / facter-inventory.json
Created April 7, 2016 23:52
Elasticsearch index template for ELK based facter/puppet inventory
{
"template": "inventory",
"mappings": {
"host": {
"_source": {
"enabled": true,
"excludes" : ["network.interfaces.*.arp", "kernel.pnp_drivers", "kernel.modules"]
},
"dynamic_templates": [
{
@jaredhanson
jaredhanson / gist:2559730
Created April 30, 2012 16:20
Restify and Passport /cc Hal Robertson
// Based off example code from Hal Robertson
// https://github.com/halrobertson/test-restify-passport-facebook
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao
var restify = require('restify')
// config vars
var FB_LOGIN_PATH = '/api/facebook_login'
var FB_CALLBACK_PATH = '/api/facebook_callback'
var FB_APPID = '<<YOUR APPID HERE>>'
@tsu-nera
tsu-nera / fib1.el
Last active May 25, 2017 16:30
fibonacci with elisp
(defun fib (n)
(fib-iter 1 0 n))
(defun fib-iter (a b count)
(if (= count 0)
b
(fib-iter (+ a b) a (- count 1))))
@tsu-nera
tsu-nera / twitter_analytics.ipynb
Last active May 25, 2017 16:34
tsu_neraのtwitterアカウント分析
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@welschma
welschma / TensorFlow Basics
Created October 21, 2016 09:58
A jupyter notebook explaining the basic usage of Tensorflow
{
"cells": [
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@Mebus
Mebus / wget.py
Created March 14, 2015 10:04
wget.py
import urllib, os
# if you comment out this line, it will download to the directory from which you run the script.
os.chdir('/tmp/test')
url = 'http://www.mydomain.com/myfile.txt'
urllib.urlretrieve(url)
usa_00002.dat
usa_00002.dat.gz
usa_000002.csv
filtered.csv
@mckeed
mckeed / rgbw-light.groovy
Created July 17, 2015 04:09
Z-Wave RGBW Light device handler
/**
* Copyright 2015 SmartThings
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License