sudo apt update
sudo apt -y upgrade
sudo apt -y install vim bash-completion wget
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -You can now add the repository to your source list
| authtoken: secret_key | |
| region: au | |
| tunnels: | |
| ssh: | |
| addr: 22 | |
| proto: tcp | |
| web: | |
| addr: 80 | |
| proto: http | |
| ssl: |
| #!/bin/bash | |
| # Description: Display notification if battery is about to charge or discharge fully. | |
| # upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "state|to\ full|percentage" ; --- There are different ways we get battery status - this is no 1 | |
| # upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' --- There are different ways we get battery status - this is no 2 | |
| # $ find /sys/class/power_supply/BAT0/ -type f | xargs -tn1 cat --- There are different ways we get battery status - this is no 3 | |
| # $ cat /sys/class/power_supply/BAT0/status --- There are different ways we get battery status - this is no 4 | |
| # $ cat /sys/class/power_supply/BAT0/capacity --- There are different ways we get battery status - this is no 5 | |
| # we will try to use 4th & 5th ; as only these gives one letter / number as output. Rest gives long string and also baterry % in long string , cannot be used to compare arithmatically |
| // Dynamic Flags | |
| let args = {};process.argv.forEach(function (val, index, array) {let valsplit = val.split("=");args[valsplit[0]] = valsplit[1]}); | |
| // Speedometer | |
| function formatBytes(a,b=2,k=1024){with(Math){let d=floor(log(a)/log(k));return 0==a?"0 Bytes":parseFloat((a/pow(k,d)).toFixed(max(0,b)))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d]}} | |
| var fs = require('fs'); | |
| var AWS = require('aws-sdk'); | |
| const StreamSpeed = require('streamspeed'); | |
| // File |
| #!groovy | |
| /* | |
| The MIT License | |
| Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
I hereby claim:
To claim this, I am signing this object:
| // Server Code ... | |
| const busboyBodyParser = require('busboy-body-parser'); | |
| // Express TCP requests parsing | |
| app.use(busboyBodyParser({ limit: '10mb', multi:true })); | |
| // Some more server code ... |