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
Print only second and third column of a file and save with a different name: | |
############################################################### | |
awk -F, '{ print $2, $3 }' data_hr.csv > data_hr1.csv | |
############################################################### | |
Only print on terminal without 1st column of a file: | |
############################################################### | |
cut --complement -f 1 -d, data_hr.csv | |
############################################################### |
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
// First declare third version as a separate variable | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
d3version3 = d3 | |
window.d3 = null | |
</script> | |
// Then declare fourth version as a separate variable |
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
In your case, I would suggest going with [submodules](https://stackoverflow.com/a/19279658/403401). However to answer your exact question, here's how you should proceed. | |
1. Start by creating `Jeremy/MyShooter` and `Jeremy/MyRPG` on Github. Keep them empty. | |
2. Clone your origin project on your system, twice, giving it different names | |
$ git clone http://github.com/Bob/CoolFramework MyShooter | |
$ git clone http://github.com/Bob/CoolFramework MyRPG |
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
# Github's web hosting looks for a branch called "gh-pages" | |
# Git by names the default branch "master" so we must rename | |
# it to "gh-pages" so that Github can find the website files. | |
# In terminal/cmd | |
############################################################# | |
mkdir YOUR_REPO.github.com | |
cd YOUR_REPO.github.com | |
echo "# hello Sanzhar" >> README.md | |
git init |
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
First, add to file and name it as csv2tab.sh the following script: | |
########################################################################### | |
#!/usr/bin/env python | |
import csv, sys | |
csv.writer(sys.stdout, dialect='excel-tab').writerows(csv.reader(sys.stdin)) | |
########################################################################### | |
Then, locate your terminal to the directory where you saved .sh file and give it execution permissions with: | |
########################################################################### | |
chmod +x the_file_name |
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
<script> | |
d3.select("li:nth-child(2n)").style("color", "red"); # second | |
d3.select("li:nth-child(even)").style("color", "red"); # even | |
</script> |
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
#Once you are in terminal/command line, access the database/collection you want to use as follows: | |
show dbs | |
use <db name> | |
show collections | |
# choose your collection and type the following to see all contents of that collection: | |
db.collectionName.find() |
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
mongoimport --db sleepmon1 --collection sensorValues --drop --file ~/Videos/data.json --jsonArray |
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
const userInfo = "sanzhar" | |
const passInfo = "unist" | |
const jsftp = require("jsftp"); | |
const Ftp = new jsftp({ | |
host: "mico.knu.ac.kr", | |
port: 22, // defaults to 21 | |
user: userInfo, // defaults to "anonymous" | |
pass: passInfo // defaults to "@anonymous" |
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
writer.append(index_only); | |
writer.append(","); | |
writer.append(time_only); | |
writer.append(","); | |
writer.append(hr_only); | |
writer.append(","); | |
writer.append(ox_only); | |
writer.append(","); | |
writer.append(temp_only); | |
writer.append("\n"); |