Skip to content

Instantly share code, notes, and snippets.

#!/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)
@atafs
atafs / AlbumDetail.js
Created February 24, 2018 01:09
react-native-albums-classComponent
const AlbumDetail = ({ album }) => {
const { title, artist, thumbnail_image, image, url } = album;
const {
thumbnailStyle,
headerContentStyle,
thumbnailContainerStyle,
headerTextStyle,
imageStyle
} = styles;
@atafs
atafs / Botton.js
Last active February 24, 2018 01:06
react-native-albums-reusableComponents
const Button = ({ onPress, children }) => {
const { buttonStyle, textStyle } = styles;
return (
<TouchableOpacity onPress={onPress} style={buttonStyle}>
<Text style={textStyle}>
{children}
</Text>
</TouchableOpacity>
);
@atafs
atafs / git-start-proj-demo.sh
Last active March 8, 2018 14:16
Demo of how to start a git repository/project
#!/bin/bash
# create a new project
cd ~; mkdir Repo; cd Repo
# create a new git repository
## git init .
git init DemoProj
mate README.md
@atafs
atafs / git-advanced-beyond-the-basics
Last active March 8, 2018 20:41
Git Basic and Advanced commands and Setup
# show the history -------------------------------------------------------------------
git hist
# check differences between 2 commits
git difftool <id> HEAD
# modify a file
mate README.md
git diff
@atafs
atafs / index.html
Last active February 24, 2018 02:04
OCaml script
<!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>-->