As configured in my dotfiles.
start new:
tmux
start new with session name:
<% header "Content-Type" => "text/html" %> | |
<h1>Let's run some ruby code: <%= rand %></h1> |
As configured in my dotfiles.
start new:
tmux
start new with session name:
<?php | |
/** | |
* Set global/skip_process_modules_updates to '1' in app/etc/local.xml and | |
* then use this script to apply updates and refresh the config cache without | |
* causing a stampede on the config cache. | |
* | |
* @author Colin Mollenhour | |
*/ | |
umask(0); | |
ini_set('memory_limit','512M'); |
GPG subkeys marked with the "authenticate" capability can be used for public
key authentication with SSH. This is done using gpg-agent which, using the
--enable-ssh-support
option, can implement the agent protocol used by SSH.
A working gpg2 setup is required. It may be possible to use gpg 1.4 but with gpg-agent compiled from gpg2. If you are using OS X 10.9 (Mavericks) then you may find the instructions [here][1] useful.
# from https://github.com/atom/atom-shell/blob/master/docs/development/build-instructions-linux.md | |
# run as root on ubuntu 14.04 | |
# basic deps | |
apt-get install build-essential clang libgtk2.0-dev libnotify-dev gcc-multilib g++-multilib libgnome-keyring-dev | |
# node | |
apt-get install python-software-properties software-properties-common | |
add-apt-repository ppa:chris-lea/node.js | |
apt-get update |
vagrant@php7dev:~/php-src$ ./configure --enable-gcov --prefix=/usr/local/php70-gcov
gives, eventually:
configure: error: To enable code coverage reporting you must have LTP installed
#!/usr/bin/bash | |
# choose pulseaudio sink via rofi or dmenu | |
# changes default sink and moves all streams to that sink | |
sink=$(ponymix -t sink list|awk '/^sink/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}'|rofi -dmenu -p 'pulseaudio sink:' -location 6 -width 100|grep -Po '[0-9]+(?=:)') && | |
# alternate version using dmenu: | |
# sink=$(ponymix -t sink list|awk '/^sink/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}'|dmenu -p 'pulseaudio sink:'|grep -Po '[0-9]+(?=:)') && | |
ponymix set-default -d $sink && | |
for input in $(ponymix list -t sink-input|grep -Po '[0-9]+(?=:)');do |
Array are not object in PHP but PHP does give us some ways to make object that act like arrays. First, there is the ArrayObject class which is pretty close to what you have with a normal array (you can iterate it, use [] etc.) If you use it as a parent for your class you can add methods to it.
class ArrObj extends ArrayObject{
// add methods here