Skip to content

Instantly share code, notes, and snippets.

View PaulCapestany's full-sized avatar

Paul Capestany PaulCapestany

View GitHub Profile

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@PaulCapestany
PaulCapestany / ripgrep-in-emacs.md
Created March 8, 2018 19:19 — forked from pesterhazy/ripgrep-in-emacs.md
Using ripgrep in Emacs using helm-ag (Spacemacs)

Why

Ripgrep is a fast search tool like grep. It's mostly a drop-in replacement for ag, also know as the Silver Searcher.

helm-ag is a fantastic package for Emacs that allows you to display search results in a buffer. You can also jump to locations of matches. Despite the name, helm-ag works with ripgrep (rg) as well as with ag.

How

import graphviz as gv
import sys
import json
graph = gv.Graph(format='svg')
lngraph = json.load(sys.stdin)
for node in lngraph['nodes']:
nodename = node['pub_key'][-6:]
@PaulCapestany
PaulCapestany / gitcheats.txt
Created February 3, 2016 02:17 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# cherry pick range of commits, starting from the tip of 'master', into 'preview' branch
git rev-list --reverse --topo-order master... | while read rev; do git checkout preview; git cherry-pick $rev || break; done
# create tracking branches for all remote branches
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs;
# git reset newly added files
#!/usr/bin/env ruby
# Giants' Shoulders Trodden Upon
# Based on the xcode auto-versioning script for Subversion by Axel Andersson
# Updated for git by Marcus S. Zarra and Matt Long
# Converted to ruby by Abizer Nasir
# Improved? By Jonathan Zhan
# Appends the number of commits on the current branch and a short git hash to the version number set in Xcode.
@PaulCapestany
PaulCapestany / detect-displays.scpt
Created November 3, 2012 12:35 — forked from Gipetto/detect-displays.scpt
Detect Displays Applescript Trigger
# This is an Applescript to trigger the Detect Displays functionality quickly on OS X
# 1. save this to a file with a `.scpt` extension
# 2. make sure that the Displays menu is set to display in the OS X menu bar
# 3. use your favorite quick access app (Spotlight, LaunchBar, Quicksilver, etc...) to call the script
#
# See: http://top-frog.com/2010/05/29/automatically-download-chromium-nightly-builds/ for a
# caveat if you have trouble and are using AppleScript when you have Adobe applications installed
to click_menu_extra at menu_list
tell application "System Events" to tell process "SystemUIServer"'s menu bar 1
@PaulCapestany
PaulCapestany / hack.sh
Last active October 6, 2015 06:27 — forked from erikh/hack.sh
OSX For Hackers
# original source: https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Using
# ---------------------
# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
@PaulCapestany
PaulCapestany / BaseViewController.m
Created May 18, 2012 08:34 — forked from boctor/BaseViewController.m
A base view controller class that when running on the simulator in debug mode, will auto simulate a memory warning every time the view controller's viewDidAppear is called
//
// BaseViewController.m
//
// Created by Peter Boctor on 5/4/11.
//
// Copyright (c) 2011 Peter Boctor
//
// 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
@PaulCapestany
PaulCapestany / Xcode4TestFlightintegration.sh
Created May 1, 2012 19:43 — forked from incanus/Xcode4TestFlightintegration.sh
Xcode 4 scheme Archive step Post-script for automatic TestFlight build uploading. See the blog post here: http://developmentseed.org/blog/2011/sep/02/automating-development-uploads-testflight-xcode
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
API_TOKEN=<TestFlight API token here>
TEAM_TOKEN=<TestFlight team token here>
SIGNING_IDENTITY="iPhone Distribution: Development Seed"
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision"
#LOG="/tmp/testflight.log"