Skip to content

Instantly share code, notes, and snippets.

View mayurah's full-sized avatar
🏔️
grooming next generation of leaders and problem solvers!

Mayur Pipaliya mayurah

🏔️
grooming next generation of leaders and problem solvers!
View GitHub Profile
-- ADB --
adb kill-server
adb devices
adb connect <ip>
adb push ~/test.txt /sdcard/
@mayurah
mayurah / escapa2.html
Created June 19, 2015 10:20
Escapa v2
<!--
_ _ _ _
| |__ __ _ ___| | _____ _ __ ___ __ _ _ __| |_| |__
| '_ \ / _` |/ __| |/ / _ \ '__/ _ \/ _` | '__| __| '_ \
| | | | (_| | (__| < __/ | | __/ (_| | | | |_| | | |
|_| |_|\__,_|\___|_|\_\___|_| \___|\__,_|_| \__|_| |_|
PS: Your task is to implement additional feature in this game named escapa.
@mayurah
mayurah / ethnic-group.csv
Created October 10, 2015 06:25
ethnic group
0 Asian
1 Indian
2 African Americans
3 Asian Americans
4 European
5 British
6 Jewish
7 Latino
8 Native American
9 Arabic
@mayurah
mayurah / whm-mass-ip-change.js
Created November 20, 2015 17:21
cpanel-whm-mass-ip-change
/* Change cPanel/WHM Mass IP via Chrome Developer Console */
var script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script);
$.fn.jquery;
$("select[name^='customip']").each(function() {
/*console.log( this.value + this.name );*/
/* $(this).find('option:selected').text(); */
/* console.log($(this).children('option:selected').text()); */
@mayurah
mayurah / mysql.sql
Last active May 20, 2016 03:41
Miscellaneous MySQL queries
# Random Rating Generator
INSERT INTO tbl_name ( rating ) VALUES ( ROUND(rand() * 5,2) );
# Create user 'hackerearth' and password 'passphrase'
CREATE USER 'hackerearth'@'localhost' IDENTIFIED BY 'passphrase';
# Grant superuser privileges to db 'test', user 'hackerearth', and hostname 'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'hackerearth'@'localhost';
# To see privilages related changes in effect.
<?php
// DEBUG
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
define('SCRIPT_DEBUG', true);
@ini_set('display_errors',1);
// DEBUG QUERY
# Software defined radio
rtl_fm -f 104M -M wbfm -s 200000 -r 48000 - | aplay -r 48k -f S16_LE
rtl_fm -f 104M -M wbfm -s 170k -A std -l 0 -E deemp -r 44.1k - | aplay -r 44.1k -f S16_LE
rtl_fm -f 106.2M -M fm -s 170k -A std -l 0 -E deemp -r 44.1k | ffmpeg -f s16le -ac 1 -i pipe:0 -acodec libmp3lame -ab 128k -f rtp rtp://127.0.0.1:1234
@mayurah
mayurah / kvm_cheatsheet.sh
Last active July 30, 2016 08:16
KVM / QEMU Cheatsheet
# List System(s)
virsh -c qemu:///system list
virsh list # List running
virsh list --all # List all
# Open guest VM console
virsh console <instance>
# Control specific instance
virsh start <instance>
@mayurah
mayurah / compiler_language_to_image.json
Created May 31, 2016 14:31
Compiler language mapped to respective programming language image Raw
[
{
"id": 1,
"language": "GNU C++11",
"icon": "https://hackerearth.0x10.info/dump/jda/language_icons/cpp.png"
},
{
"id": 2,
"language": "GNU C++",
"icon": "https://hackerearth.0x10.info/dump/jda/language_icons/cpp.png"
@mayurah
mayurah / apache_ab.log
Created June 23, 2016 07:08
Apache AB - Command and Log
$ ab -r -n 500 -c 20 -k -H "Accept-Encoding: gzip, deflate" http://odessatech.0x10.info/ | tee -a ab.log
$ cat ab.log | ccze -A
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking odessatech.0x10.info (be patient)