- command + option + J, context: html, result: suround with template
- command + shift + return, context: statement or var declaration, result: add semi colon
- command + return, context: in fragment context, result: run the fragment, convenient when your database is configured to work with the IDE, command + return will execute the sql query
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
module Main exposing (..) | |
import Html exposing (..) | |
-- MODEL | |
type alias Model = | |
{ key : Int } |
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
https://ellie-app.com/wmXvyWVYqza1/0 |
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
- Websocket | |
- Flexbox |
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
module Confirm exposing (confirm) | |
import Native.Confirm | |
import Task exposing (Task) | |
confirm : String -> Task () () | |
confirm str = | |
Native.Confirm.doConfirm str |
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 | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# this script will display the current version, automatically | |
# suggest a "minor" version update, and ask for input to use | |
# the suggestion, or a newly entered value. |
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
describe('controllerCtrl', function () { | |
var $controller, | |
$rootScope, | |
$scope; | |
beforeEach(module('controller')); | |
beforeEach(inject(function ($injector) { | |
$controller = $injector.get('$controller'); | |
$rootScope = $injector.get('$rootScope'); |
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
var warn = true; | |
window.onbeforeunload = function(e){ | |
e = e || window.event; | |
if(warn){ | |
e.returnMessage = 'yop'; | |
setTimeout(function(){ | |
warn = false; | |
location.href='http://google.fr'; | |
}, 1); | |
return 'Are you sure? I got a secret to show you before!'; |
Whenever you're using alias tasks, you can't pass a flag to aliased tasks. Here are a few patterns to deal with that.
For a global setting available to all tasks, use options:
grunt.registerTask('upload', 'Upload code to deploy', function(n) {
var target = grunt.option('target');
// use target var to do something useful
});
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
- CTRL+D, **Select a word and all its occurrence** | |
- CTRL+SHIFT+D, **Copy paste the current line** | |
- CTRL+M, **Move the caret to the closest bracket or curly bracket** | |
- CTRL+SHIFT+M, **Select content into the the closest bracket or curly bracket** | |
- CTRL+L, **Select the current line** | |
- CTRL+SHIFT+L, **add a caret at the end of each line selected** | |
- CTRL+K+K, **Delete all the content on the right of the caret** | |
- CTRL+SHIFT+K, **Delete the current line** | |
- CTRL+W, **close the current tab** | |
- CTRL+SHIFT+G, **Wrap content with a tag, can use zen coding** |