$ mkdir myapp
$ cd myapp
$ npm init #follow instructions - wizard app
$ git init
$ npm i express
This file contains hidden or 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
# This function allows you to install tmbdundles cloning from git being in any folder | |
# Usage | |
# $ tmbundle https://github.com/textmate/json.tmbundle.git | |
function tmbundle { | |
if [ -n "$1" ]; then | |
dir=$(pwd) | |
cd ~/Library/Application\ Support/TextMate/Bundles/ | |
git clone $1 | |
cd $dir |
This file contains hidden or 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 | |
# | |
# Runs 'pod install' after performing a merge in the local repository | |
source ~/.bash_profile | |
pod install |
This file contains hidden or 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
// Create a basic animation changing the transform.scale value | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; | |
// Set the initial and the final values | |
[animation setFromValue:[NSNumber numberWithFloat:1.5f]]; | |
[animation setToValue:[NSNumber numberWithFloat:1.f]]; | |
// Set duration | |
[animation setDuration:0.5f]; |
This file contains hidden or 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
// Add a ease in&out timing function on the animation | |
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; |
This file contains hidden or 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
// Add custom timing as a bezier curve | |
[animation setTimingFunction:[CAMediaTimingFunction functionWithControlPoints:.34 :.01 :.69 :1.37]]; |
This file contains hidden or 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
# | |
# This file is the main config file for your service. | |
# It's very minimal at this point and uses default values. | |
# You can always add more config options for more control. | |
# We've included some commented out config examples here. | |
# Just uncomment any of them to get that config option. | |
# | |
# For full config options, check the docs: | |
# docs.serverless.com | |
# |
This file contains hidden or 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
// log the `rnd` result in the console using all three async techniques. | |
// You can only call console.log inside the `main` function. | |
const randomNumber = () => { | |
return Math.random(); | |
} | |
// 1. Make it wait for 1 sec. with `setTimeout` and log it on main function | |
const timeoutRandomNumber = () => { | |
OlderNewer