brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
NSString *equation = @"floor((19-10)/2)"; | |
NSNumber *result = [NSExpression expressionWithFormat:equation]; | |
NSLog(@"%@", result); // logs "4" |
#!/bin/bash | |
# | |
# screen-paste - Paste a screenshot to the Web (using pixbin.us service) | |
# | |
# Written by Senko Rasic <senko.rasic@goodcode.io> | |
# Released into Public Domain. Use it as you like. | |
# | |
# The tool allows the user to select a portion of the screen, then copies it | |
# to pixbin.us, and stores the resulting URL in clipboard. | |
# |
#!/usr/bin/env python | |
# From http://stackoverflow.com/questions/3085153/how-to-parse-the-manifest-mbdb-file-in-an-ios-4-0-itunes-backup | |
import sys | |
import hashlib | |
mbdx = {} | |
def getint(data, offset, intsize): | |
"""Retrieve an integer (big-endian) and new offset from the current offset""" | |
value = 0 |
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=frame-nopass.pdf -c .setpdfwrite -f frame.pdf |
The program below can take one or more plain text files as input. It works with python2 and python3.
Let's say we have two files that may contain email addresses:
foo bar
ok ideler.dennis@gmail.com sup
hey...user+123@example.com,wyd
hello world!
alias ng="npm list -g --depth=0 2>/dev/null" | |
alias nl="npm list --depth=0 2>/dev/null" |
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
// | |
// command-line-args.swift | |
// | |
// Created by Jim Correia on 6/4/14. | |
// Copyright (c) 2014-2015 Jim Correia. All rights reserved. | |
// | |
print("PROG_NAME = \(Process.arguments[0])") | |
print("ARGC = \(Process.argc)") | |
print("ARGV = \(Process.arguments)") |