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
app.get('/',function(req,res){ | |
//send Json | |
var js_On = ['One','Two','Three','Four'] | |
res.json(js_On) | |
res.end() | |
//send HTML | |
var html = "<h1>Head</h1>" | |
res.send(html) |
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
Request | |
-------------------------------------------------------- | |
curl -X POST https://bitbucket.org/site/oauth2/access_token \ | |
-d grant_type=client_credentials \ | |
-u user_key:user_secret \ | |
-------------------------------------------------------- | |
Response | |
-------------------------------------------------------- | |
{ |
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
//----------- Server Code------------------------ | |
var net = require('net'); | |
var srv = net.createServer(function(socket){ | |
socket.on('data',function(data){ | |
console.log(data.toString()); | |
}) | |
socket.end('Love, from server') | |
}).on('error',function(err){ | |
throw err; | |
}) |
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
#Create a directory with todays date | |
mkdir 20%date:~-2,4%%date:~0,2%%date:~7,2% |
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
"Simple snippet to view data on map" | |
m <- get_map("India",zoom=14,maptype="hybrid",source="google") | |
ggmap(m,base_layer = ggplot(aes(x=abstract$long,y=abstract$lat),data=abstract))+geom_point(colour="green") |
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
- name: generate token | |
#CURL to generate a Token | |
win_command: curl -k -X POST https://bitbucket.org/site/oauth2/access_token -d grant_type=client_credentials -u user_key:user_secret | |
register: resp | |
- set_fact: | |
tkn: "{{ resp.stdout | from_json }}" | |
cacheable: true | |
- name: initiating it as git repository | |
win_shell: git init | |
args: |
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
Show hidden characters
// yarn add eslint babel-eslint eslint-plugin-flowtype flow-bin@^0.67.0 eslint-plugin-react eslint-plugin-react-native eslint-plugin-flowtype | |
{ | |
"env": { | |
"browser": true, | |
"react-native/react-native": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended", |
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
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"node": true | |
}, | |
"parser": "babel-eslint", | |
"extends": ["standard","eslint:recommended", "plugin:react/all"], | |
"parserOptions": { |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
OlderNewer