TL;DR from A successful Git branching model by Vincent Driessen.
When starting work on a new feature, branch off from the develop branch.
$ git checkout -b myfeature develop
function __log2header($message) | |
{ | |
if (headers_sent()) | |
{ | |
return false; | |
} | |
// Escape newline (not allowed in headers) | |
$message = str_replace("\n", "\\n", $message); | |
var reflowDocument = function () { | |
var viewportWidth = jQuery(window).width(); | |
// do stuff here | |
}; | |
jQuery(document).ready(function($) { | |
var reflowTimer = null; | |
$(window).on('resize', function () { |
function generateRandomString($length = 10) | |
{ | |
$alphabet = '0123456789abcdefghijklmnopqrstuvwxyz'; | |
$alphabet_length = strlen($alphabet); | |
$randomChars = array(); | |
for ($i = 0; $i < $length; $i++) | |
{ | |
$randomChars[] = $alphabet[mt_rand(0, $alphabet_length - 1)]; | |
} |
function uuid($identifier = '') | |
{ | |
return sha1($identifier.microtime(true).mt_rand().php_uname()); | |
} |
TL;DR from A successful Git branching model by Vincent Driessen.
When starting work on a new feature, branch off from the develop branch.
$ git checkout -b myfeature develop
#!/bin/bash | |
# Instructions for setting up a custom development machine | |
# on Ubuntu 18.04, distributed via Microsoft Store. | |
# Step 1: Install the Windows Subsystem for Linux: | |
# https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
# Step 2: Install Ubuntu via Windows Store: | |
# https://www.microsoft.com/store/apps/9N9TNGVNDL3Q |
Download emacs-w64 and extract somewhere, e.g. a tools
or apps
folder like C:\Users\<user>\tools\emacs
.
Emacs and many other applications store its configuration in the user's "home" folder. Translated directly from the Unix world, that is %UserProfile%
(C:\Users\<user>
), but Windows prefers %AppData%
instead (C:\Users\<user>\AppData\Roaming
).
For simplicity's sake, override this by specifying the HOME
environment variable explicitly. Emacs and some other applications (e.g. MinGW) lets this override the default.
#Persistent | |
; Run ShowBreakMessage every 30 minutes | |
SetTimer, ShowBreakMessage, 1800000 | |
Return | |
ShowBreakMessage: | |
if (A_TimeIdlePhysical > 900000) | |
{ | |
; Idle more than 15 minutes - no reminder |
open System | |
let readLines filePath = System.IO.File.ReadAllLines(filePath) | |
let day1 = | |
printfn "** Day 1 **" | |
// Läs in alla rader till ett set av heltal | |
let entries = readLines "data/1.txt" |> Set.ofArray |> Set.map Int32.Parse | |
// Ta fram alla "2020-kompis-par" för varje tal |
async Task PauseAsync() | |
{ | |
// Normal asynchronous method call | |
await Task.Delay(1000); | |
} | |
void Pause() | |
{ | |
// Synchronous method blocking on asynchronous method | |
PauseAsync().Wait(); |