Skip to content

Instantly share code, notes, and snippets.

View JacopKane's full-sized avatar

Furkan Tunalı JacopKane

View GitHub Profile
@colinharman
colinharman / Alfred+ScreenSharing+AppleScript+MountainLion.scpt
Created August 6, 2012 02:33
Alfred + Screen Sharing + AppleScript + Mountain Lion = Winning
tell application "Screen Sharing"
activate
tell application "Screen Sharing"
activate
tell application "System Events"
keystroke "osx-mini.local" -- "osx.mini.local" would need to be replaced by "YourComputerName or IP Address"
keystroke return
end tell
@schmunk42
schmunk42 / autogenerate-packages.php
Created October 8, 2012 16:27
Test-script to auto-generate packages.json from github API
<?php
// get all repos from yiiext
$response = file_get_contents("https://api.github.com/orgs/yiiext/repos");
$repos = json_decode($response);
#var_dump($repos);
// get versions/tags
$satis = array();
foreach($repos AS $num => $repo) {
@cobyism
cobyism / gh-pages-deploy.md
Last active April 15, 2024 04:48
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@vjt
vjt / copy-from-time-machine.sh
Last active March 8, 2024 17:05
Copy data from a Time Machine volume mounted on a Linux box.
#!/bin/bash
#
# Copy data from a Time Machine volume mounted on a Linux box.
#
# Usage: copy-from-time-machine.sh <source> <target>
#
# source: the source directory inside a time machine backup
# target: the target directory in which to copy the reconstructed
# directory trees. Created if it does not exists.
#
@cheeaun
cheeaun / js-error-logging-services.md
Last active December 10, 2023 13:04
JavaScript error logging services
@davisford
davisford / setup-avahi.sh
Created July 12, 2013 14:14
Setup avahi-daemon on Ubuntu for so you can reach hostname `ubuntu.local` from host OS
sudo apt-get install avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan
@robertkowalski
robertkowalski / npm-registry-licenses.txt
Created November 23, 2013 22:31
The licenses in the npm-registry from their package.json, from the latest version of each module 23.11.2013
The licenses in the npm-registry from their package.json, from the latest version of each module
23.11.2013
[ { key: 'undefined', value: 27785 },
{ key: 'MIT', value: 20811 },
{ key: 'BSD', value: 5240 },
{ key: 'BSD-2-Clause', value: 621 },
{ key: 'Apache 2.0', value: 263 },
{ key: 'GPL', value: 233 },
@sindresorhus
sindresorhus / post-merge
Last active February 14, 2024 06:20
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@jeffmo
jeffmo / gist:054df782c05639da2adb
Last active January 11, 2024 06:05
ES Class Property Declarations
@dominicthomas
dominicthomas / ffmpeg wav -> mp3
Created October 7, 2014 09:30
Convert a wav to a 320k mp3 using ffmpeg.
ffmpeg -i inputfile.wav -ab 320k outputfile.mp3