Skip to content

Instantly share code, notes, and snippets.

@opnchaudhary
opnchaudhary / install-yaourt.sh
Created January 24, 2019 03:56
install yoaurt
#!/bin/bash
cd /tmp/ && git clone https://aur.archlinux.org/package-query.git
cd package-query && makepkg -si && cd /tmp/
git clone https://aur.archlinux.org/yaourt.git
cd yaourt && makepkg -si
@opnchaudhary
opnchaudhary / screen-record-alias
Created February 10, 2019 10:15
Bash aliases using ffmpeg to capture desktop and webcam
# To take a screenshot screen.png:
alias screencapture='ffmpeg -f x11grab -video_size 1366x768 -i $DISPLAY -vframes 1 screen.png'
# To take a screencast screen.mkv with lossless encoding and without audio:
alias recorddesktopmkv='ffmpeg -f x11grab -video_size 1366x768 -framerate 25 -i $DISPLAY -c:v ffvhuff screen.mkv'
# To take a screencast screen.mp4 with lossy encoding and with audio:
alias recorddesktopmp4='ffmpeg -f x11grab -video_size 1366x768 -framerate 25 -i $DISPLAY -f alsa -i default -c:v libx264 -preset ultrafast -c:a aac screen.mp4'
# To record a video webcam.mp4 from the webcam without audio
alias recordwebcamv='ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -c:v libx264 -preset ultrafast webcam.mp4'
# To record a video webcam.mp4 from the webcam with audio:
alias recordwebcamav='ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -f alsa -i default -c:v libx264 -preset ultrafast -c:a aac webcam.mp4'
@opnchaudhary
opnchaudhary / brightness.sh
Created March 6, 2019 10:59 — forked from himito/brightness.sh
Control Brightness
xrandr --output $(xrandr -q | awk '/ connected / {print $1}') --brightness 0.8
@opnchaudhary
opnchaudhary / update-alternatives
Created October 17, 2019 08:59
Set java in alternatives after manual install
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk/jdk1.8.0_144/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/jdk/jdk1.8.0_144/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/jdk/jdk1.8.0_144/bin/javaws" 1
@opnchaudhary
opnchaudhary / README.md
Created November 20, 2019 08:18 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@opnchaudhary
opnchaudhary / .htaccess
Created November 26, 2019 04:34
laravel 4
# Redirect if index.php is in the URL
RewriteRule ^index.php/(.+) /$1 [R=301,L]
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@opnchaudhary
opnchaudhary / force-install
Created February 13, 2020 09:31
Force Install in arch linux
sudo pacman -S npm --overwrite='*'
@opnchaudhary
opnchaudhary / install_ruby
Created March 19, 2020 03:27 — forked from lemanchester/install_ruby
Installing Ruby 2.1.5 on Ubuntu
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz
tar -xvzf ruby-2.1.5.tar.gz
cd ruby-2.1.5/
./configure --prefix=/usr/local
make
make install
@opnchaudhary
opnchaudhary / i3status.conf
Created May 26, 2020 14:57
/etc/i3status.conf
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true