I am trying out Microsoft's VS Code editor to see if it is good enough to replace Sublime.
Below is a work in progress of transferring settings I liked in Sublime.
animation: rock 4.5s infinite; | |
@keyframes rock { | |
from { | |
transform: rotate(0deg) translate(50px,0); | |
animation-timing-function: ease-in-out; | |
} | |
50% { | |
transform: rotate(0) translate(-150px,0); | |
animation-timing-function: ease-in-out; |
/*! CSS.supports() Polyfill | |
* https://gist.github.com/codler/03a0995195aa2859465f | |
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
if (!('CSS' in window)) { | |
window.CSS = {}; | |
} | |
if (!('supports' in window.CSS)) { | |
window.CSS._cacheSupports = {}; | |
window.CSS.supports = function(propertyName, value) { |
I am trying out Microsoft's VS Code editor to see if it is good enough to replace Sublime.
Below is a work in progress of transferring settings I liked in Sublime.
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
commit 6e59bfbc45983b8680f023ac07a34cabe80985e5 | |
Author: Adam Jakubek <[email protected]> | |
Date: Mon Aug 13 01:24:39 2012 +0200 | |
Prevent focus stealing when opening diverted URLs | |
This patch allows to override current Chrome's behavior, where opening a | |
link from an external application (e.g. mail client) causes Chrome's | |
window to steal focus. | |
It works by introducing a new command line switch |
/** | |
* Check if localStorage is supported const isSupported: boolean | |
* Check if localStorage has an Item function hasItem(key: string): boolean | |
* Get the amount of space left in localStorage function getRemainingSpace(): number | |
* Get the maximum amount of space in localStorage function getMaximumSpace(): number | |
* Get the used space in localStorage function getUsedSpace(): number | |
* Backup Assosiative Array interface Backup | |
* Get a Backup of localStorage function getBackup(): Backup | |
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true) | |
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false) |
// allows YYYY/M/D and periods instead of slashes | |
// http://stackoverflow.com/questions/24989065/trying-to-validate-yyyy-mm-dd | |
/^\d{4}[\/.]\d{1,2}[\/.]\d{1,2}$/ | |
// YYYY-MM-DD and YYYY-M-D | |
// http://stackoverflow.com/questions/6177975/how-to-validate-date-with-format-mm-dd-yyyy-in-javascript | |
/^\d{4}\-\d{1,2}\-\d{1,2}$/ | |
// YYYY-MM-DD | |
// https://gist.github.com/arth2o/8471150 |
$.fn.setAllToMaxHeight = function(){ | |
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) ); | |
} | |
// usage: $(‘div.unevenheights’).setAllToMaxHeight(); |
var customModel = new CustomModel(); | |
var sampleView = new Backbone.View({ | |
model: customModel | |
}); |
Handlebars.JavaScriptCompiler.prototype.nameLookup = function(parent, name, type) { | |
var result = '(' + parent + ' instanceof Backbone.Model ? ' + parent + '.get("' + name + '") : ' + parent; | |
if (/^[0-9]+$/.test(name)) { | |
return result + "[" + name + "])"; | |
} else if (Handlebars.JavaScriptCompiler.isValidJavaScriptVariableName(name)) { | |
return result + "." + name + ')'; | |
} else { | |
return result + "['" + name + "'])"; | |
} | |
}; |