Skip to content

Instantly share code, notes, and snippets.

View skl's full-sized avatar

Stephen Lang skl

View GitHub Profile
@darioguarascio
darioguarascio / CloudflareFailover.php
Last active October 22, 2015 18:11
Laravel command to add/remove/list a domain IPs part of the CloudFlare round-robin ip Failover system
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use \Requests;
/*
|--------------------------------------------------------------------------
| Cloudflare domain IPv4 A-type manager
@timblair
timblair / 20150820-go-workshop-notes.md
Created August 21, 2015 09:22
2015-08-20: Go Workshop Notes

2015-08-20: Go Workshop Notes

Variables and Types

  • Type gives the compiler two things: size + representation. The compiler guarantees these types
@bcoe
bcoe / npm-top.md
Last active March 21, 2025 03:49
npm-top.md

npm Users By Downloads (git.io/npm-top)


npm users sorted by the monthly downloads of their modules, for the range May 6, 2018 until Jun 6, 2018.

Metrics are calculated using top-npm-users.

# User Downloads
@koshatul
koshatul / README.md
Last active May 7, 2025 14:29
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
func activateProximitySensor(isOn: Bool) {
let device = UIDevice.current
device.isProximityMonitoringEnabled = isOn
if isOn {
NotificationCenter.default.addObserver(self, selector: #selector(proximityStateDidChange), name: UIDevice.proximityStateDidChangeNotification, object: device)
let session = AVAudioSession.sharedInstance()
do{
try session.setCategory(.playAndRecord)
try session.setActive(true)
try session.overrideOutputAudioPort(AVAudioSession.PortOverride.speaker)