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
[Desktop Entry] | |
Name=Android Studio 2 | |
Comment=Official IDE for Android | |
Exec="/path/to/executable" | |
Icon="/path/to/icon" | |
Terminal=false | |
Type=Application | |
Categories=Development;IDE;Android; | |
StartupNotify=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
#!/bin/bash | |
# Get the IP of the connected android device | |
IP=`adb shell netcfg | grep wlan0 | awk '{ print $3 }' | awk -F'/' '{ print $1 }'` | |
# Port used for connecting, on device. Change as required | |
DEBUG_PORT='5555' | |
# Start the adb as tcpip deamon | |
adb tcpip $DEBUG_PORT |
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
#So as not to be disturbed by Ctrl-S(XOFF) ctrl-Q(XON) in terminals: | |
stty -ixon |
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
#!/bin/bash | |
VIDEO=$1 | |
AUDIO=$2 | |
DATE=`date +%Y-%m-%d.%H:%M:%S` | |
OUTPUT="Output_"$DATE".mp4" | |
ffmpeg -i $VIDEO -i $AUDIO \ | |
-c:v copy -c:a aac -strict experimental \ | |
-map 0:v:0 -map 1:a:0 $OUTPUT |
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
'use strict'; | |
// this program will result in an "JavaScript heap out of memory" | |
const fs = require('fs'); | |
const printer = function () { | |
const fil = fs.createWriteStream('file'); | |
let i = 0; | |
const MAX_LIM = 1e6; |
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 example to read a file line by line and multiply values by 2 and write | |
// to an output file | |
'use strict'; | |
const stream = require('stream'); | |
// const readStream = new ReadStream({ | |
// read(size) { | |
// if () | |
// } | |
// }); |
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 fs = require('fs'); | |
const http = require('http'); | |
const server = http.createServer((req, res) => { | |
// res.setHeader('Content-Type', 'video/mp4'); | |
const fil = fs.createReadStream('/home/rajat/Videos/apparchitecture.mp4'); | |
const head2 = { | |
'Content-Type': 'video/mp4', | |
}; | |
res.writeHead(200, head2); |
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 xhr = new XMLHttpRequest(); | |
xhr.responseType = 'json'; | |
xhr.open("POST", "/graphql"); | |
xhr.setRequestHeader("Content-Type", "application/json"); | |
xhr.setRequestHeader("Accept", "application/json"); | |
xhr.onload = function () { | |
console.log('data returned:', xhr.response); | |
} | |
xhr.send(JSON.stringify({query: "{ hello }"})); |
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
<Calculator> | |
<DisplayWindow /> | |
<NumPad> | |
<Key number={1}/> | |
<Key number={2}/> | |
. | |
. | |
. | |
<Key number={9}/> | |
</NumPad> |
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
function Hello(props) { | |
return <div>{props.name}</div> | |
} |
OlderNewer