- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
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
_uploadSnap() { | |
var url = 'http://example.com/upload'; // File upload web service path | |
var photo = { | |
uri: this.state.picturePath, // CameralRoll Url | |
type: 'image/jpeg', | |
name: 'photo.jpg', | |
}; | |
var formData = new FormData(); | |
formData.append("file", photo); |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/dynamodb" | |
) |
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
description "Description goes here" | |
author "Your Name" | |
start on (local-filesystems and net-device-up) | |
stop on runlevel [!2345] | |
respawn | |
exec /path/to/compiled/binary -flag value -flag2 value2 |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
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
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
sudo dnf config-manager --add-repo=http://negativo17.org/repos/fedora-nvidia.repo
sudo dnf install cuda-devel cuda-cudnn-devel
sudo dnf install nvidia-settings kernel-devel dkms-nvidia vulkan nvidia-driver-libs nvidia-driver-cuda
pip install tensorflow-gpu
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
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./permission"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
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
import {action1, action2} from "myActions"; | |
import {bindActionCreators} from "redux"; | |
const mapDispatchToProps(dispatch) => { | |
return { | |
manuallyBoundAction : (...args) => dispatch(action1(...args)), | |
autoBoundAction : bindActionCreators(action2, dispatch), | |
multipleActionsTogether : bindActionCreators({action1, action2}, dispatch) | |
} | |
}; |
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
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T [email protected] | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
OlderNewer