Skip to content

Instantly share code, notes, and snippets.

View ada10fl2's full-sized avatar

Filip Lindqvist ada10fl2

View GitHub Profile
@ada10fl2
ada10fl2 / Rational.h
Last active August 29, 2015 13:56
A fast Rational i c++, using Binary GCD ( __builtin_ctz )
#include <iostream>
#include <algorithm>
using namespace std;
class Rational {
private:
size_t p;
size_t q;
@ada10fl2
ada10fl2 / git-php-deploy.php
Last active December 13, 2020 17:57
Getting PHP Git Deploy script to work on Windows
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
$l_git = "/c/Program Files (x86)/Git/bin/git";
$l_sshadd = "/c/Program Files (x86)/Git/bin/ssh-add";
$w_agent = "C:\\Program Files (x86)\\Git\\bin\\ssh-agent.exe";
$w_bash = "C:\\Program Files (x86)\\Git\\bin\\bash.exe";
$l_cmd = "'\"$l_sshadd\" /c/Users/myuser/.ssh/deploy; "
. "cd /c/xampp/htdocs; "