Skip to content

Instantly share code, notes, and snippets.

View taskinoz's full-sized avatar

taskinoz

View GitHub Profile
/**
* Returns a string concatenation of the elements of a matrix (2d array) in "spiral" order.
* @param {[[]]} matrix - the 2d array
* @param {string} [separator] - optional separator to use between values in string, defaults to ", "
* @returns {string}
*/
function spiralMatrix(matrix, separator) {
if (matrix.length === 0 || matrix[0].length === 0) {
return "";
}
@rtt
rtt / tinder-api-documentation.md
Last active May 5, 2024 15:28
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@simonewebdesign
simonewebdesign / pre-push
Created March 12, 2014 22:08
git hook to deploy a site via FTP (ftp-push)
#!/bin/sh
echo "Running pre-push hook..."
branch=`git rev-parse --abbrev-ref HEAD`
if [ $branch == "master" ]; then
echo "Deploying to FTP..."
git ftp push
echo "done!"
fi
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@kirb
kirb / .htaccess
Last active November 16, 2020 22:39
Self-hosted Cydia repo download counter
# Use the Apache rewrite engine to redirect downloads to our script.
RewriteEngine On
RewriteBase /
RewriteRule ^repo/((Packages|Release)(.*)?)$ /repo/counter.php?filename=$1 [L,QSA]
RewriteRule ^repo/downloads/(.*)\.deb$ /repo/counter.php?filename=$1 [L,QSA]