Change all files and folders permissions of a directory to 644/755
chmod -R u+rwX,go+rX,go-w /foo
How to count all the lines of code in a directory recursively?
find . -name '*.php' | xargs wc -l
Change all files and folders permissions of a directory to 644/755
chmod -R u+rwX,go+rX,go-w /foo
How to count all the lines of code in a directory recursively?
find . -name '*.php' | xargs wc -l
* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE AUTH=OTP SASL-IR
* CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE IDLE URLAUTH
Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
"""time.process_time() and time.perf_counter() for Python 2 on Ubuntu.""" | |
import ctypes | |
import errno | |
from ctypes.util import find_library | |
from functools import partial | |
CLOCK_PROCESS_CPUTIME_ID = 2 # time.h | |
CLOCK_MONOTONIC_RAW = 4 | |
clockid_t = ctypes.c_int |
rsync (Everyone seems to like -z, but it is much slower for me)
package main | |
import ( | |
"fmt" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"time" | |
) | |
type Person struct { |