| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
| #!/bin/bash | |
| # | |
| # bash script to create playlist files in music subdirectories | |
| # | |
| # Steve Carlson (stevengcarlson@gmail.com) | |
| find . -type d | | |
| while read subdir | |
| do | |
| rm -f "$subdir"/*.m3u |
To colaborate on a gist:
- Clone your gist repo locally
- Add your friend’s fork as a remote
e.g. if your friend is named Cindy:
git remote add-url cindy https://gist.github.com/cindy/df03bdacaef75a80f310 - Fetch your friend’s commits:
git fetch cindy/master - Merge your friend’s changes into your repo:
git merge cindy/master - Push the changes back to GitHub:
git push origin/master
| # Next time you need to install something with python setup.py -- which should be never but things happen. | |
| python setup.py install --record files.txt | |
| # This will cause all the installed files to be printed to that directory. | |
| # Then when you want to uninstall it simply run; be careful with the 'sudo' | |
| cat files.txt | xargs sudo rm -rf | |
| <?php | |
| class CalendarEvent { | |
| /** | |
| * | |
| * The event ID | |
| * @var string | |
| */ | |
| private $uid; |
| <?php | |
| /** | |
| * ICS.php | |
| * ======= | |
| * Use this class to create an .ics file. | |
| * | |
| * Usage | |
| * ----- | |
| * Basic usage - generate ics file contents (see below for available properties): |
Continuous Integration (CI) is an important practice every team should adopt in order to detect defects and errors early and solve integration problems easily. Roughly speaking we may say that CI is a practice that allows the growth of solid software by giving greater confidence to the developers and better products to the final customers.
The concept behind CI is fairly simple: the codebase is owned by several developers that continuously integrate their changes to a common version control system. For each integration the system runs a predefined set of tasks automatically; these tasks may vary from running all the tests to building all the components.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParentelem.clientLeft,elem.clientTop,elem.clientWidth,elem.clientHeightelem.getClientRects(),elem.getBoundingClientRect()
| #!/bin/sh | |
| timezone="Europe/Zurich" | |
| # List of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones | |
| script="${0##*/}" | |
| rootdir=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd) | |
| logfile="$script.log" | |
| log="$rootdir/$logfile" | |
| now=$(TZ=":$timezone" date) | |
| # Uncomment 'mailto=' (remove #) to enable emailing the log upon completion | |
| #mailto="your@email.com" |