This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
NewerOlder