Skip to content

Instantly share code, notes, and snippets.

View Using Github Deploy Key.md

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@jshbrntt
jshbrntt / private.xml
Created Mar 10, 2015
Karabiner ScrollWheel (Left/Right) to OSX Spaces Navigation
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>ScrollWheel(Left/Right)</name>
<appendix>(You can switch Desktop by scroll wheel left/right.)</appendix>
<identifier>private.scroll_wheel_left_right</identifier>
<autogen>
__ScrollWheelToKey__
ScrollWheel::LEFT | ModifierFlag::NONE,
KeyCode::CURSOR_LEFT, ModifierFlag::CONTROL_R
@joechrysler
joechrysler / who_is_my_mummy.sh
Last active Sep 30, 2022
Find the nearest parent branch of the current git branch
View who_is_my_mummy.sh
#!/usr/bin/env zsh
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
# How it works:
anonymous
anonymous / globalmaptiles.py
Created Dec 27, 2012
Create dots from US Census block-level shapefiles
View globalmaptiles.py
#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008
# Global Map Tiles Classes
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326,
# generate a simple HTML viewers based on Google Maps and OpenLayers
# Author: Klokan Petr Pridal, klokan at klokan dot cz
# Web: http://www.klokan.cz/projects/gdal2tiles/
@johanmeiring
johanmeiring / gist:2894568
Created Jun 8, 2012
PHP str_putcsv function
View gist:2894568
<?php
/* From: http://www.php.net/manual/en/function.str-getcsv.php#88773 and http://www.php.net/manual/en/function.str-getcsv.php#91170 */
if(!function_exists('str_putcsv'))
{
function str_putcsv($input, $delimiter = ',', $enclosure = '"')
{
// Open a memory "file" for read/write...
$fp = fopen('php://temp', 'r+');
// ... write the $input array to the "file" using fputcsv()...
fputcsv($fp, $input, $delimiter, $enclosure);