Skip to content

Instantly share code, notes, and snippets.

View kiwiroy's full-sized avatar
🥝
Nom

Roy Storey kiwiroy

🥝
Nom
View GitHub Profile
@shazron
shazron / gist:943736
Created April 27, 2011 04:55
About XCode 4 Project Template (How To Create Custom Project Template)
From: http://snipt.net/yonishin/about-xcode-4-project-template
XCode 4 Projects and Files Template Folder: /Developer/Library/Xcode/Templates
Examples:
/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Empty.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Base/Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Mac Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Cocoa Application.xctemplate
@domoritz
domoritz / wos.php
Created March 10, 2012 19:32 — forked from pol/wos.php
Web of Science API access with ruby, python and php libs
<?php
$auth_url = "http://search.isiknowledge.com/esti/wokmws/ws/WOKMWSAuthenticate?wsdl";
$auth_client = @new SoapClient($auth_url);
$auth_response = $auth_client->authenticate();
$search_url = "http://search.isiknowledge.com/esti/wokmws/ws/WokSearchLite?wsdl";
$search_client = @new SoapClient($search_url);
$search_client->__setCookie('SID',$auth_response->return);
$search_array = array(
@msoap
msoap / wgethtml.pl
Last active June 9, 2020 09:46
save html page with css/js/images
#!/usr/bin/perl
#################################################
#
# load html with css/js/img and embed it
#
#################################################
use warnings;
use strict;
@xtetsuji
xtetsuji / data-section-emulate.pl
Created October 3, 2012 09:16
Emulate __DATA__ section for mod_perl Registry/PerlRun script, and so on.
#!/usr/bin/perl
# Emulate __DATA__ section for mod_perl Registry/PerlRun script, and so on.
use strict;
use warnings;
### In tail of this file, its "data" exists and defines inside BEGIN { ... } block.
my $DATA;
open \*DATA, '<', \$DATA;
@blahah
blahah / stackexchange-style.csl
Last active June 27, 2016 02:36
a CSL style suitable for Zotero, Mendeley, etc. designed for use on StackExchange sites (especially biology.stackexchange.com)
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<info>
<title>Biology.SE</title>
<id>http://phyta.org/biology-stackexchange-style</id>
<link href="https://gist.github.com/Blahah/5681588" rel="self"/>
<author>
<name>Richard Smith</name>
<email>richardsmith404@gmail.com</email>
</author>
#!/bin/bash
trap 'rm -rf "$tempdir"' EXIT
tempdir=$(mktemp -d)
cd "$tempdir" || exit 1
printf '%s\n' \
'(return 2>/dev/null); echo $?' \
> bash_return
@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@Integralist
Integralist / GitHub curl.sh
Last active June 18, 2024 23:31 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@kanatohodets
kanatohodets / mojo-unix-sock.pl
Last active November 8, 2019 04:09
Mojo::UserAgent over a unix socket
#!/usr/bin/env perl
use strict;
use warnings;
use 5.20.0;
use IO::Socket::UNIX;
use Mojo::Util qw(monkey_patch);
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;