start new:
tmux
start new with session name:
tmux new -s myname
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
/** | |
* Inspired by http://stackoverflow.com/questions/1727077/generating-a-drop-down-list-of-timezones-with-php | |
* @return array | |
*/ | |
function generate_timezone_list() | |
{ | |
static $regions = [ | |
'Africa' => DateTimeZone::AFRICA, | |
'Americas' => DateTimeZone::AMERICA, |
#sudo pip3 install mysqlclient fails with mysql_config not found | |
sudo apt-get install libmysqlclient-dev | |
#without pip3 it will not going to work for python3 | |
sudo pip3 install mysqlclient | |
# to run django migration | |
python3 manage.py migrate |
#!/bin/sh | |
apt-get install php5-dev make cmake php-pear | |
git clone git://github.com/alanxz/rabbitmq-c.git && cd rabbitmq-c | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. | |
cmake --build . --target install |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
As configured in my dotfiles.
start new:
tmux
start new with session name:
<?php
/**
* @method DbTable_Row_Foo createRow()
*/
class DbTable_Foo extends Zend_Db_Table_Abstract
{
protected $_primary = 'foo_id';
protected $_name = 'foo';
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
#!/usr/bin/env python | |
import curses | |
import curses.textpad | |
import time | |
stdscr = curses.initscr() | |
#curses.noecho() | |
#curses.echo() |