Skip to content

Instantly share code, notes, and snippets.

View edwardIshaq's full-sized avatar

Edward Ishaq edwardIshaq

View GitHub Profile
#!/usr/bin/env bash
set -u -e -o pipefail
go list -u -m -json all \
| jq -r 'if (.Indirect | not) and .Update then "\(.Path)\t\(.Version)\t\(.Update.Version)" else "" end' \
| sed -E 's/v[0-9]\.0\.0-[0-9]+-//g' \
| sed -E 's/golang.org\/x\//github.com\/golang\//g' \
| while read -r NAME A B
do
@leveled
leveled / change hostname from command line on mac os x
Created December 29, 2016 23:15
Change the local/network name on mac os x from the command line
$ sudo sysctl kern.hostname=localhost
$ sudo hostname -s localhost
$ sudo scutil --set HostName localhost
$ sudo scutil --set LocalHostName localhost
$ sudo scutil --set ComputerName localhost
//
// Signal+Extensions.swift
// Khan Academy
//
// Created by Nacho Soto on 10/1/15.
// Copyright © 2015 Khan Academy. All rights reserved.
//
import ReactiveCocoa
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@chriseidhof
chriseidhof / LICENSE
Last active July 16, 2019 13:14
A tiny networking library
Copyright 2015 Chris Eidhof
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHE
@chriseidhof
chriseidhof / parsing.swift
Last active April 16, 2023 02:38
JSON Parsing in Swift
// This code accompanies a blog post: http://chris.eidhof.nl/posts/json-parsing-in-swift.html
//
// As of Beta5, the >>= operator is already defined, so I changed it to >>>=
import Foundation
let parsedJSON : [String:AnyObject] = [
"stat": "ok",
"blogs": [
@jonfriskics
jonfriskics / gist:9360674
Created March 5, 2014 03:34
UIImagePickerController tints
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
// for light navigation item text, or UIBarStyleDefault for dark navigation item text
imagePickerController.navigationBar.barStyle = UIBarStyleBlack;
// the actual color will be affected by the translucency setting
imagePickerController.navigationBar.barTintColor = [UIColor blueColor];
// default is YES, but you could change to NO
imagePickerController.navigationBar.translucent = YES;