Skip to content

Instantly share code, notes, and snippets.

View IndrekV's full-sized avatar
🏠
Working from home

Indrek Vändrik IndrekV

🏠
Working from home
View GitHub Profile
@IndrekV
IndrekV / link_checker.sh
Created January 22, 2014 14:34
Simple script to check urls.
@IndrekV
IndrekV / check_links.sh
Last active August 29, 2015 13:56
Advanced link checker. Takes in a path to a directory, then finds all urls in all the files inside this directory and all it's subdirectories. Then checks if urls are valid. Has nice progressbar.
@IndrekV
IndrekV / nsarray.mm
Created February 25, 2014 13:00 — forked from jeremy-w/nsarray.mm
//clang++ -std=c++11 -stdlib=libc++ -framework Foundation nsarray.mm -o nsarray
/* Note:
* - libstdc++ has been frozen by Apple at a pre-C++11 version, so you must opt
for the newer, BSD-licensed libc++
* - Apple clang 4.0 (based on LLVM 3.1svn) does not default to C++11 yet, so
you must explicitly specify this language standard. */
/* @file nsarray.mm
* @author Jeremy W. Sherman
*
* Demonstrates three different approaches to converting a std::vector
@IndrekV
IndrekV / zombiefy.js
Last active August 29, 2015 13:57
Zombiefy script to turn any website into zombieland
var html = "<style>";
html += ".eye-holder{position:absolute;top:10px;left:10px;right:10px;bottom:10px;z-index:888;}.eyes{color:red;font-size:90px;position:absolute;font-family:Arial;font-weight:700;z-index:-1;-webkit-animation-duration:10s;-webkit-animation-timing-function:ease;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-duration:10s;-moz-animation-timing-function:ease;-moz-animation-iteration-count:infinite;-moz-animation-direction:normal;-o-animation-duration:10s;-o-animation-timing-function:ease;-o-animation-iteration-count:infinite;-o-animation-direction:normal;-ms-animation-duration:10s;-ms-animation-timing-function:ease;-ms-animation-iteration-count:infinite;-ms-animation-direction:normal;animation-duration:10s;animation-timing-function:ease;animation-iteration-count:infinite;animation-direction:normal}.eye-1{top:10px;left:6%;-webkit-animation-name:eyes_one;-moz-animation-name:eyes_one;-o-animation-name:eyes_one;-ms-animation-name:eyes_one;animation-name

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

# http://stackoverflow.com/questions/9206013/javascript-fuzzy-search#answer-15252131
String.prototype.fuzzy = (search) ->
return true unless search
str = @toLowerCase()
search = search.toLowerCase()
i = 0
@IndrekV
IndrekV / install_cygwin_sshd.txt
Last active September 3, 2015 09:08 — forked from roxlu/install_cygwin_sshd.txt
Installing CYGWIN + SSHD for remote access through SSH on windows
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
@IndrekV
IndrekV / camera.html
Created October 12, 2015 12:52 — forked from dhavaln/camera.html
Phonegap Camera Capture Example
<!DOCTYPE html>
<html>
<head>
<title>Capture Photo</title>
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/>
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
var pictureSource; // picture source
var destinationType; // sets the format of returned value
@IndrekV
IndrekV / gist:dcf7f6633c29173db7df5da5758a3cb9
Created September 17, 2016 18:45 — forked from anonymous/gist:478997
isometric calculations
var hitArray:Array = new Array();
//we FIRST move the player, then move the player BACKWARD if there's a collision.
player.sprite.x += player.xVelocity;
player.sprite.y += player.yVelocity;
player.sprite.z += player.zVelocity;
// Here, I do a 3D hit test to see the player is touching any of the objects in the scene.
// Those objects are then tested later to see WHERE they touch.
@IndrekV
IndrekV / Main.hx
Created December 6, 2017 12:45 — forked from jgranick/Main.hx
Basic GameCenter Example
package;
import extension.gamecenter.GameCenter;
import extension.gamecenter.GameCenterEvent;
import flash.display.Sprite;
class Main extends Sprite {