Instantly share code, notes, and snippets.

💾
Back to coding!

# Rahulrahuldottech

💾
Back to coding!
• Sort options
Created Jul 30, 2019
Handy scripts to use when SSH-ing into servers for
View getcputemp.cmd
 @echo off for /f "skip=1 tokens=2 delims==" %%A in ('wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature /value') do set /a "HunDegCel=(%%~A*10)-27315" echo %HunDegCel:~0,-2%.%HunDegCel:~-2% Degree Celsius
Last active Oct 24, 2018
Pseudocode for modulus and multiplication functions with only addition and subtraction
View pseudo-mod.txt
 1. multiplication: function input --> (x*y) if ( either x or y is less than zero ){ FOR loop: product = subtract x from zero y times } else if ( both are greater than or both are less than zero ){ FOR loop: product = add x to to zero y times }
Last active Oct 11, 2018
invShell [Windows/VBS] - Run batch files, commands and executables invisibly
View details.txt
Last active Oct 11, 2018
[Arduino] buttonWait - wait for button press before further execution.
View 1_details.txt
 buttonWait v0.1 by rahuldottech --------------------------------- (pause a script till a button is, y'know, *pressed*...) This code is in the public domain. Proper schematic at https://arduino.stackexchange.com/a/56805/50258 --
Created Sep 22, 2018
What I wrote while watching Tom Scott's video. Turned out pretty well. https://www.youtube.com/watch?v=QPZ0pIK_wsc
View FizzBuzz.cpp
 #include int main(){ using namespace std; for(int i=1; i<101; i++){ if(i%3==0){ cout<<"Fizz"; } if(i%5==0){ cout<<"Buzz"; }
Last active Oct 11, 2018
View details.txt
Last active Aug 26, 2018
Usage examples for varDx
View 1-usage.php
 def('file1.txt'); //define data file \$a = "this is a string"; \$dx->write('val1', \$a); //write key to file \$dx->modify('val1', "this is another string"); //modify value of key echo \$dx->read('val1'); //read value of key if(\$dx->check('val1')){ //check if key exists del('val1'); //delete key
Last active Aug 22, 2018
Usage examples for secSesh