This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Draws a point at the intersection of two lines | |
% L1 = V1 + s * W1 | |
% L2 = V2 + t * W2 | |
function drawAtLineIntersection(V1, W1, V2, W2) | |
if isequal(V1, V2) && isequal(W1, W2) | |
c = V1; % could be any point on the line | |
else | |
i = [W1, -W2] \ (V2 - V1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar xOf dump.sql.tar.gz | mysql -u $user -p $database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -o click click.c -Wall -framework ApplicationServices | |
#include <ApplicationServices/ApplicationServices.h> | |
#include <unistd.h> | |
// Coord to click on | |
#define X 422 | |
#define Y 192 | |
int main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function url2pdf { | |
tmp_file=.tmp.html | |
res_file=${1//[^A-Za-z0-9.:-]/}.pdf | |
curl $1 > $tmp_file | |
cupsfilter -f $tmp_file > $res_file | |
rm $tmp_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((/usr/local/php/bin/php -f /var/www/queue.php) & echo $! > /var/run/queue.pid &) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.ssh/id_rsa.pub | pbcopy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pandoc --mathjax --from markdown --to html5 -s file.md -o file.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -d branchname | |
git push origin :branchname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git push origin :v1.0.0 | |
git tag -d v1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git reset --soft "HEAD~1" | |
git push -f origin HEAD^:master |