Skip to content

Instantly share code, notes, and snippets.

View anirudh-ramesh's full-sized avatar
🏁
pongal-o-pongal

Anirudh Ramesh anirudh-ramesh

🏁
pongal-o-pongal
View GitHub Profile
@anirudh-ramesh
anirudh-ramesh / Node-RED_file_upload.json
Created June 19, 2021 11:39 — forked from natcl/Node-RED_file_upload.json
Node-RED file upload example with built-in http in node.
[
{
"id": "f1ffeb7e.f6451",
"type": "http in",
"z": "c29865fe.249648",
"name": "",
"url": "/upload",
"method": "get",
"upload": false,
"swaggerDoc": "",
@anirudh-ramesh
anirudh-ramesh / select.sh
Created March 18, 2017 14:58 — forked from vikjam/select.sh
Use awk to subset a CSV
# http://stackoverflow.com/questions/6491532/how-to-subset-a-file-select-a-numbers-of-rows-or-columns
cat largefile | awk 'NR >= 10000 && NR <= 100000 { print }'
#!/bin/bash
# This scripts pops up a notification in X if your RAM is occupied more
# than a certain value (default: 90%).
# Memory is checked every 30 seconds.
checkmemory () {
while
sleep 30
FREE=`free -tw | grep Mem | tr -s ' ' | cut -d ' ' -f 4`
USED=`free -tw | grep Mem | tr -s ' ' | cut -d ' ' -f 3`
@anirudh-ramesh
anirudh-ramesh / renameBranch.sh
Last active June 23, 2016 11:40 — forked from stuart11n/gist:9628955
Renames local as well as remote Git branches.
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote