Similar to C's printf()
"I'm the god damn {0}{1}".format("Batman", "!");
// returns I'm the god damn Batman!
input:-webkit-autofill { | |
-webkit-box-shadow: 0 0 0 1000px #466f92 inset; | |
transition: background-color 5000s ease-in-out 0s; | |
} | |
input[type=text], | |
input[type=password] { | |
background: #466f93 !important; | |
} |
// prefix that needs to be attached to all the css classes | |
$prefix: app-; | |
// that variable can be used as #{$prefix} to attach that prefix to every class | |
.#{$prefix}header { | |
background: red; | |
} | |
.#{$prefix}content { | |
background: yellow; |
var cnt = 15; | |
switch(true) { | |
case cnt < 0: | |
console.log('We r at a loss!'); | |
break; | |
case cnt > 0: | |
console.log('Somethin in it!'); | |
break; | |
default: |
There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.
The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.
When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].
When working with a centralized workflow the concepts are simple, master
represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message
or github-oauth
for your branches.
@echo off | |
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
var Q = require('q'); | |
var formatStr = function(str) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
return str.replace(/{(\d+)}/g, function(match, number) { | |
return typeof args[number] != 'undefined' | |
? args[number] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
svg { | |
height: 1000px; | |
width: 1000px; |
// Greg's awesome article had broken syntax highligting, leading to unreadable code :( So I fixed it up here, | |
// putting it on a Gist for myself and for others. Here's the original article: | |
// http://www.gregshackles.com/presenters-in-mvvmcross-navigating-android-with-fragments/ | |
// First let's quickly set up the basic app essentials here, starting with the view models: | |
using Cirrious.MvvmCross.ViewModels; | |
namespace PresenterDemo.Core.ViewModels | |
{ |