- https://digitalocean.com | VPS, dead cheap
- http://www.arcustech.com | managed VPS, cheap
- http://fortrabbit.com | PHP as a service, git deployment, slightly pricier
- https://uberspace.de | dynamic, cheap (german only)
- https://www.df.eu | fair pricing, amazing support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
$("nav").find("a[href*=#]:not([href=#])").click(function () { | |
var offset = 0; | |
var speed = 1000; | |
var target = $(this.hash); | |
$("html,body").animate({ | |
scrollTop: target.offset().top - offset | |
}, speed); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 = 4+2+1 (read/write/execute) | |
6 = 4+2 (read/write) | |
5 = 4+1 (read/execute) | |
4 = 4 (read) | |
3 = 2+1 (write/execute) | |
2 = 2 (write) | |
1 = 1 (execute) | |
0 = 0 (no permission) | |
chmod 124 /file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Path: app/macros.php (required once in app/start/global.php) | |
Form::macro('selectTime', function($name, $low, $high, $unit, $options = [], $selected = null, $step = 1) | |
{ | |
if ( ! Lang::has('options.' . $unit) ) | |
{ | |
throw new InvalidArgumentException('Failed finding a translation for the provided unit.'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize ... (just an example) | |
@import "components/normalize"; | |
@import "variables"; | |
@import "mixins"; | |
// Load optional components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.example { | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
margin: auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Configuration | |
## | |
MASTER_SERVER_ADDRESS="_ENTER_YOUR_LAPTOP_IP_HERE_" | |
MAILFROM="_ENTER_FROM_EMAIL_HERE_" | |
MAILTO="_ENTER_TO_EMAIL_HERE_" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_RGB_in_HSV/HSL | |
*/ | |
private convertRgbToHsl(rgbColor: { r: number; g: number; b: number; }): { h: number; s: number; l: number; } { | |
let h: number; | |
let s: number; | |
let l: number; | |
let { r, g, b } = rgbColor; | |
[ r, g, b ] = [ r, g, b ].map((value) => value / 255); |
A directory where all the source code lives. Do not put any additional project files in here.
Instead organize such files under ~/Documents
.
Suppose you have a directory for additional project files
~/Documents/…/Some\ Project
:It is advisable to create a symlink pointing to the corresponding source code directory.
You should also add a.url
file that is linking to the corresponding repository on GitHub or the like.