git config --global credential.helper cache
git config credential.helper 'cache --timeout=36000'
BRANCHES (checkout https://github.com/rek/devconfig too now):
git branch -v
wget http://pecl.php.net/get/APC-3.1.13.tgz | |
tar xvzf APC-3.1.13.tgz | |
cd APC-3.1.13 | |
/usr/local/bin/phpize-5.4 | |
./configure --with-php-config=/usr/local/php54/bin/php-config | |
make | |
cp modules/apc.so ~/.php/5.4/ | |
rm -Rf APC-3.1.13 |
#!/bin/bash | |
PROJECTNAME="myproject" | |
KEYREPO="prod" | |
echo -e '\n=======================================================' | |
echo "# APK Builder for Play Store deployment #" | |
echo '=======================================================' | |
echo ' ' | |
read -p "Are you sure you want to do this? [y/n] " -r | |
echo # (optional) move to a new line |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNDqa06FRAviHixBZOJJR0EMzTx3zrFU6elIu4S3aWUImM3RWiy6jqkIGcygX1QBvgJr1949jWVqp7KdWXF26uXDoo5Akq6W3Av4CC0VXgswg+4bJbYZL7KvgHh3KXJculhs1n6yr13oVi7o/e0Um64ggNu7S4Pin1e1Z17bycLzmQDnRFN428dF0btxo153RJMTGlhE9v1HteRbhfQwSsuw7HVRMGyZEZeSXWX6nObeDAVqh5S8EKXZZUBIYIZpP8HTwbG541rDYxUtQZO/d+wR2vwy+/OSLIcpRBe305Nm6vsIRR8l6bfJBmuI1UBn4D3n7ccOJAY8Qna/WYZNRH |
{?cond} | |
cond is true | |
{:else} | |
cond is not true | |
{/cond} | |
{^cond} | |
cond is false | |
{:else} | |
cond is not false |
git config --global credential.helper cache
git config credential.helper 'cache --timeout=36000'
git branch -v
<snippet> | |
<content><![CDATA[ | |
}); | |
]]></content> | |
<tabTrigger>w</tabTrigger> | |
<description>Close callback function: });</description> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.javascript</scope> --> | |
</snippet> |
var view = new View({ | |
state: state, // <- state | |
)}; | |
state.set({ | |
action: 'myFunction', | |
data: { | |
awesome: true | |
} | |
}); |
Start: | |
sudo su - postgres | |
psql | |
By default, postgres tries to connect to a database with the same name as your user. | |
To prevent this default behaviour, just specify user and database: | |
psql -U Username DatabaseName | |
To check if running: | |
sudo service postgresql status |
import _ from 'lodash' | |
let inserter = (table, items) => { | |
let validKeys = _.keys(items).join(', '), | |
countKeys = _.reduce(items, (results) => { | |
results.push('$' + (results.length + 1)) | |
return results | |
}, []).join(', '), | |
data = _.values(items) |
#!/bin/bash | |
echo '' | |
echo '--------------------------' | |
echo "--RE-TAGGING: ${1}" | |
echo '--------------------------' | |
echo '' | |
git tag -d ${1} | |
git push origin :refs/tags/${1} |