Skip to content

Instantly share code, notes, and snippets.

View 2KAbhishek's full-sized avatar
🤩
Fixing Tpyos!

Abhishek Keshri 2KAbhishek

🤩
Fixing Tpyos!
View GitHub Profile
@2KAbhishek
2KAbhishek / tmp_inc.sh
Created August 6, 2019 02:57
Increase /tmp size for heavy installations (e.g - Android Studio)
#Increase /tmp size for heavy installations (e.g - Android Studio)
sudo mount -o remount,size=6G /tmp/
@2KAbhishek
2KAbhishek / Click_Me.bat
Created August 6, 2019 02:59
Fork Bomb, keeps cloning itself until system is out of memory
%0|%0
@2KAbhishek
2KAbhishek / Move_EFI.md
Created August 6, 2019 03:09
Move EFI partition

Using Minitool PW:

  1. Shrink the Windows partition by the same size as the existent EFI partition is. (300mb in my case) and place the unallocated space before the windows partition (the "before" is the most important point).

  2. Create a new FAT32 partition from the unallocated space

  3. copy the EFI partiton to this new partition. validate the operations.

Using Gparted

@2KAbhishek
2KAbhishek / media_key.sh
Created August 6, 2019 03:12
Commands executed when keyboard media keys are pressed, useful for keyboards without these keys.
#Increase Volume
amixer set Master 5%+ -q
#Decrease Volume
amixer set Master 5%- -q
#Decrease Brightness
xbacklight -dec 5
#Increase Brightness
@2KAbhishek
2KAbhishek / diff_patch.sh
Created August 6, 2019 03:40
Diff & Patch
diff -u v1.txt v2.txt > diff.patch
patch -p1 v1.txt < diff.patch
@2KAbhishek
2KAbhishek / replace_name.sh
Created August 6, 2019 03:44
Replace Certain Part of filename
#Replace Certain Part of filename
for filename in ./*; do mv "./$filename" "./$(echo "$filename" | sed -e 's/old/new/g')"; done
@2KAbhishek
2KAbhishek / remove_dup.sh
Created August 6, 2019 03:45
Remove duplicate lines from file
#Remove duplicate lines
awk '!visited[$0]++' old_file > new_file
@2KAbhishek
2KAbhishek / Podcasts.opml.xml
Last active August 29, 2019 16:02
My Podcast Subscriptions
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<head>
<title>Podcast Subscriptions</title>
</head>
<body>
<outline text="CodeNewbie" title="CodeNewbie" type="rss" htmlUrl="http://feeds.codenewbie.org/cnpodcast.xml" xmlUrl="http://feeds.codenewbie.org/cnpodcast.xml" />
<outline text="Puliyabaazi Hindi Podcast" title="Puliyabaazi Hindi Podcast" type="rss" htmlUrl="http://puliyabaazi.ivm.libsynpro.com/rss" xmlUrl="http://puliyabaazi.ivm.libsynpro.com/rss" />
<outline text="The Passion People Podcast" title="The Passion People Podcast" type="rss" htmlUrl="https://audioboom.com/channels/4903093.rss" xmlUrl="https://audioboom.com/channels/4903093.rss" />
<outline text="Belong Accelerate" title="Belong Accelerate" type="rss" htmlUrl="http://feeds.soundcloud.com/users/soundcloud:users:399018450/sounds.rss" xmlUrl="http://feeds.soundcloud.com/users/soundcloud:users:399018450/sounds.rss" />
@2KAbhishek
2KAbhishek / displaymode.sh
Created August 9, 2019 10:11
Add unsupported display resolution.
# Run cvt with required resolution
cvt 1360 768 60
# Copy the ModeLine section of output and use with xrandr
xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
# Add the output mode
xrandr --addmode VGA1 1360x768_60.00
# Set the output mode & add this line to a startup script
@2KAbhishek
2KAbhishek / designMode.js
Created August 23, 2019 08:59
Edit web pages for testing.
// Open web console and run
// Turn design mode on
document.designMode = 'on';
// Turn off after done testing
document.designMode = 'off';