The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
#!/usr/bin/env ruby -wKU | |
# Comments added 6 March 2014. | |
# Implementation of the MetaWeblog API for my personal Ruby static blog generator. | |
# This is not even nearly idiomatic Ruby. There are all kinds of issues. | |
# (What's with the method interiors all being mushed-up together?) | |
# But -- it's also worked flawlessly for five years without my having to edit it. | |
# It won't work for anyone else as-is — but if it helps anyone | |
# to do a MetaWeblog API implementation, then cool. |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
// | |
// Glob.swift | |
// | |
// Created by Brad Grzesiak on 6/25/15. | |
// Copyright © 2015 Bendyworks Inc. | |
// Released under the Apache v2 License. | |
// | |
import Foundation |
Over-reacted to second hand info and misinterpreted docs.
I do think OAuth providers (like Github, Twitter, Facebook, etc...) should do more to discourage apps from requesting write access. It PARTICULARLY disturbs me that admin:public_key
is even an option in Github's Scopes. So the potential for disasterous outcomes certainly exists when granting access to apps via Github's OAuth system, but provided that you carefully read what you're granting access to, it's not necessarily as bad a my original post (left intact below) made it out.
During a twitter conversation[1] this morning, I discovered that in order for an application to get something as simple as your name during a single-sign on, it has to ask for full user profile information. That's a bit scary by itself, but when asking for full profile information, it also has to ask for read and WRITE permissions.[2]
Yes, in order to use single-signon to a 3rd party site, I have to give that site the rights to modify my email addr
For some reason, the network interfaces in ubuntu/wily64 fail to configure at boot. The interfaces are renamed during boot, with dmesg
reporting things like udev renamed network interface eth0 to enp1s0. This is apparently the result of a change in systemd. You can read about it here:
Starting with v197 systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. This is a departure from the traditional interface naming scheme ("eth0", "eth1", "wlan0", ...), but should fix real problems.
http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
import Glibc | |
// Swift 3 version here: https://gist.github.com/erica/7aee99db9753a1636e0fbed8d68b5845 | |
/* | |
Did a bunch of tweaks this morning: | |
removed == true (sorry Kametrixom!) | |
cleaned up both stringFromBytes and bytesFromString | |
changed fperror check to guard | |
replaced use of 1024 in several places with a single constant |
#!/bin/bash | |
echo -n "Running phpunit... " | |
vendor/bin/phpunit --stop-on-failure --stop-on-error > /dev/null | |
if [ $? -ne 0 ] | |
then | |
echo "[FAILED]" | |
exit 1 | |
fi |
let digs: Set<Character> = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] | |
extension String { | |
var firstNum: Int? { | |
return self | |
.characters | |
.indexOf(digs.contains) | |
.map(characters.suffixFrom) | |
.flatMap { cs in | |
Int(String(cs.prefixUpTo(cs.indexOf { c in !digs.contains(c) } ?? cs.endIndex))) |
# Close all notifications | |
my closeNotifications() | |
on closeNotifications() | |
tell application "System Events" to tell process "Notification Center" | |
set theWindows to every window | |
repeat with i from 1 to number of items in theWindows | |
set this_item to item i of theWindows | |
try | |
click button 1 of this_item |
#!/bin/bash | |
# | |
# Faster toolchain build: skips as much as possible. | |
# | |
# To use this toolchain from the command line:" | |
# export TOOLCHAINS=$(whoami) | |
# | |
# we build to the same prefix every time (instead of building | |
# to a versioned prefix) because every time the prefix changes | |
# *everything* rebuilds. |