Skip to content

Instantly share code, notes, and snippets.

View renjithspace's full-sized avatar
👨‍💻
Research. Design. Build. Test. Ship. Optimize. Repeat.

Renjith renjithspace

👨‍💻
Research. Design. Build. Test. Ship. Optimize. Repeat.
View GitHub Profile
#!/bin/sh
git — work-tree=/home/username/www — git-dir=/home/username/repo/code/beta.git checkout -f
cd path/to/project
git remote add beta ssh://username@host/home/username/repo/code/beta.git
git push beta master
$ man bash
$ npm install -g typescript
$ tsc main.ts
function say(message) {
alert(message)
}
let message = 'Hello world'
say(message)
function say(message: string) { // Type annotaion
alert(message)
}
let message = 'Hello world'
say(message)
function say(message: string) {
alert(message)
}
say('Hello world') // Works fine
say(100) // Produce error
let syncExecution = step => {
/*
Here `for` loop through string `loop`
So, here output 1 to 4 in console
*/
for (let index in 'loop') {
step++
console.log(step)
}