Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| class DataBuffer { | |
| var internalData: NSData; | |
| init(fromData: NSData) { | |
| self.internalData = NSData.dataWithData(fromData) as NSData; | |
| } | |
| init(fromFilePath: String) { | |
| self.internalData = NSData.dataWithContentsOfFile(fromFilePath, options: .DataReadingMappedIfSafe, error: nil) as NSData; | |
| } |
| (evil-define-state god | |
| "God state." | |
| :tag " <G> " | |
| :message "-- GOD MODE --" | |
| :entry-hook (evil-god-start-hook) | |
| :exit-hook (evil-god-stop-hook) | |
| :input-method t | |
| :intercept-esc nil) | |
| (defun evil-god-start-hook () |
| #!/usr/bin/env perl | |
| # | |
| # http://daringfireball.net/2007/03/javascript_bookmarklet_builder | |
| use strict; | |
| use warnings; | |
| use URI::Escape qw(uri_escape_utf8); | |
| use open IO => ":utf8", # UTF8 by default | |
| ":std"; # Apply to STDIN/STDOUT/STDERR |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| (ns noize.core | |
| (:use [overtone.live :exclude [midi->hz sharp flat scale run pitch shift]])) | |
| (definst harps# [freq 440] | |
| (let [duration 1] | |
| (* | |
| (line:kr 1 1 duration FREE) | |
| (pluck (* (white-noise) (env-gen (perc 0.001 5) :action FREE)) 1 1 (/ 1 freq) (* duration 2) 0.25)))) | |
| (def midi-0 8.1757989156) |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| from geventwebsocket.handler import WebSocketHandler | |
| from gevent.pywsgi import WSGIServer | |
| from flask import Flask, request, render_template | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| return render_template('index.html') |
| /* Border & Vignette Setup */ | |
| figure{ | |
| position: relative; | |
| display: block; | |
| line-height: 0; | |
| width: 500px; | |
| height: 333px; | |
| margin-bottom: 2em; | |
| border: 1em solid #fff; |