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
WangSongdeMacBook-Air:~ wangsong$ npm install -g npm-check-updates | |
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules | |
/usr/local/lib | |
├── [email protected] | |
├── [email protected] | |
├─┬ [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├─┬ [email protected] | |
│ │ └── [email protected] |
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
let dragon = | |
name => | |
size => | |
element => | |
name + ' is a ' + | |
size + 'dragon that breaths ' + | |
element +'!' | |
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
var http = require('http'); | |
var myServer = http.createServer(function(request, response) { | |
response.writeHead(200, {"Content-Type" : "text/html"}); | |
response.write('<h1>Roux Meetups</h1>'); | |
response.end(); | |
}); | |
myServer.listen(3000); | |
console.log('Go to http://localhost:3000 on your browser'); |
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
snippet head "jekyll" b | |
--- | |
layout: post | |
title: $1 | |
date: `date +%Y-%m-%d` | |
categories: | |
- $2 | |
tags: | |
- $3 | |
--- |
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
try: | |
with open('python4.json', 'a') as f: | |
tweet = json.loads(data) | |
geo_data = { | |
"features": [] | |
} | |
if tweet['place']: | |
geo_json_feature = { | |
"place": tweet['place'], | |
} |
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
class MyListener(StreamListener): | |
def on_data(self, data): | |
try: | |
with open('python0.json', 'a') as f: | |
tweet = json.loads(data) | |
if tweet['coordinates']: | |
print(1) | |
f.write(data) | |
return True |
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 json | |
with open('python222.json', 'r') as f: | |
geo_data = { | |
"type": "FeatureCollection", | |
"features": [] | |
} | |
for line in f: | |
tweet = json.loads(line) | |
if tweet['coordinates']: | |
geo_json_feature = { |
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
var mystyle = { | |
"color": "#ff7800", | |
"weight": 5, | |
"opacity": 0.65 | |
}; | |
function popout(feature, layer) { | |
layer.bindpopup(`<h1>${feature.properties.name}</h1>\n<h3>${feature.properties.created_at.slice(0, 16)}</h3>\n<h2>${feature.properties.text}</h2>\n<h3>📍${feature.properties.location}</h3>`); | |
}; |
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
let mapleader="\<Space>" | |
set laststatus=2 | |
set smartindent | |
" let foo=3 | |
set expandtab | |
" set softtabstop=-2 | |
" set tabstop=2 | |
" set smarttab | |
" function source() |
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
let categories = [ | |
{id: 'animals', 'parent': null}, | |
{id: 'mammals', 'parent': 'animals'}, | |
{id: 'dogs', 'parent': 'animals'}, | |
{id: 'chihuahua', 'parent': 'dogs'}, | |
{id: 'labrador', 'parent': 'dogs'}, | |
{id: 'persian', 'parent': 'cats'}, | |
] | |
OlderNewer