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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>GistRun</title> | |
<!--<link rel="stylesheet" href="styles.css">--> | |
</head> | |
<body> | |
<h1>Hello world!</h1> | |
<!--<script src="script.js"></script>--> |
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
# show the history ------------------------------------------------------------------- | |
git hist | |
# check differences between 2 commits | |
git difftool <id> HEAD | |
# modify a file | |
mate README.md | |
git diff |
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 | |
# create a new project | |
cd ~; mkdir Repo; cd Repo | |
# create a new git repository | |
## git init . | |
git init DemoProj | |
mate README.md |
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
const Button = ({ onPress, children }) => { | |
const { buttonStyle, textStyle } = styles; | |
return ( | |
<TouchableOpacity onPress={onPress} style={buttonStyle}> | |
<Text style={textStyle}> | |
{children} | |
</Text> | |
</TouchableOpacity> | |
); |
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
const AlbumDetail = ({ album }) => { | |
const { title, artist, thumbnail_image, image, url } = album; | |
const { | |
thumbnailStyle, | |
headerContentStyle, | |
thumbnailContainerStyle, | |
headerTextStyle, | |
imageStyle | |
} = styles; |
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 | |
# add remote connection called origin (default name) | |
git remote add origin git@github.com:atafs/fed-bed-git-version-control.git | |
# check | |
git remote | |
git remote -v | |
# change existing remote connection (eg from https to ssh) |
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 | |
# install wget, virtualbox and vagrant | |
brew install wget | |
# enable in mac preferences to run oracle vm: https://developer.apple.com/library/content/technotes/tn2459/_index.html | |
brew cask install --force virtualbox | |
brew cask install vagrant | |
brew cask install vagrant-manager | |
# get a fresh Ubuntu 14.04 machine running and create a Vagrantfile |
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
// open the dev environment | |
// https://stephengrider.github.io/JSPlaygrounds/ | |
// create reducer (function) | |
const reducer = (state = [], action) => { | |
if (action.type === 'SPLIT_STRING') { | |
return action.payload.split(''); | |
} else if (action.type === 'ADD_CARACTER') { | |
// DO NOT MUTATE DATA IN A REDUCER | |
//state.push(action.payload); |
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
// jestdescr | |
// Inserts describe() block | |
describe('$NAME$', function() { | |
$END$ | |
}); |
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 generator function | |
let generator = function*() { | |
return 5 | |
} | |
let obj = generator() | |
obj.generator().next() | |
// iterate throught it | |
generator = function*() { | |
yield 1; |
OlderNewer