Skip to content

Instantly share code, notes, and snippets.

View samundra's full-sized avatar
🔬
refine details

Samundra samundra

🔬
refine details
View GitHub Profile
@samundra
samundra / .skhdrc
Last active November 21, 2020 05:08
yabai and skhd configs
# Open terminal
shift + alt - return : /Applications/iTerm.app/Contents/MacOS/iTerm2 --single-instance -d "/Users/samundra"
# change size of window
shift + alt - w : yabai -m window --resize top:0:-20 ; yabai -m window --resize bottom:0:-20
shift + alt - a : yabai -m window --resize left:-20:0 ; yabai -m window --resize right:-20:0
shift + alt - s : yabai -m window --resize bottom:0:20 ; yabai -m window --resize top:0:20
shift + alt - d : yabai -m window --resize right:20:0 ; yabai -m window --resize left:20:0
shift + alt - r : yabai -m window --resize right:100:0
shift + alt - l : yabai -m window --resize left:-100:0
@samundra
samundra / keymaps.json
Last active November 8, 2020 15:26
Visual Studio Code files
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+1",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+[",
"command": "workbench.action.navigateBack"
},
@samundra
samundra / show-ip.sh
Last active December 27, 2017 09:14
Show Local IP
findIp() {
ip=`ifconfig -a | grep inet|grep "192."|tail -1|cut -f2 -d ":"|cut -f1 -d " "`
echo $ip
}
findIp
# Usage:
# chmod +x show-ip.sh
# - ./show-ip.sh
@samundra
samundra / phpmyadmin.conf
Created March 17, 2017 17:13
phpmyadmin.conf
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
@samundra
samundra / macos-sublime-bindings.js
Last active October 22, 2018 01:08
MacOS Specific - Sublime Keybindings
[
{ "keys": ["super+shift+y"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Set Syntax: "} },
{ "keys": ["super+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
{ "keys": ["super+alt+n"], "command": "advanced_new_file_new"},
{ "keys": ["super+shift+d"], "command": "git_diff"},
{ "keys": ["super+shift+c"], "command": "copy_relative_path"},
{ "keys": ["super+e"], "command": "extended_switcher", "args": {"list_mode": "window"} },
{ "keys": ["super+shift+e"], "command": "extended_switcher", "args": {"list_mode": "active_group"} },
{ "keys": ["alt+enter"], "command": "goto_definition" },
{ "keys": ["super+shift+a"], "command": "alignment" },
@samundra
samundra / MakeSeedServiceProvider.php
Created February 12, 2017 09:56
Provides the "make:seeder" command in Lumen5.3.*
<?php
/**
* Filename: App/Providers/MakeSeedServiceProvider.php
*/
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Console\Seeds\SeederMakeCommand;
@samundra
samundra / docker-network.sh
Last active April 10, 2017 03:07
List the active running docker containers ip
#!/bin/bash
set -e
## List all actively running docker container ip
##
## USAGE:
## chmod +x docker-network.sh
## ./docker-network.sh
##
## OUTPUT: 172.19.0.5 - my_container_2
@samundra
samundra / youtubeplayer.sh
Last active October 5, 2017 10:52
Borderless youtube player
#!/bin/bash
# Play and download the youtube video simultaneously
# Author: Samunddra
# Update Date: 2016-12-14 16:29:14 PM
#
# Use `screen` to play it in the background, fork screen process and exit, enjoy
#
# DEPENDENCIES
# - sudo apt install -y jq mplayer youtube-dl
#
@samundra
samundra / adminer.conf
Created December 6, 2016 09:02
adminer nginx configuration
server {
listen 80;
listen [::]:80;
root /var/www/adminer;
index index.php index.html index.htm;
server_name adminer.dev;
location / {
autoindex on;
#!/usr/bin/perl -T
use strict;
use warnings;
#
## Calomel.org ,:, Download Youtube videos and music using wget
## Script Name : youtube_wget_video.pl
## Version : 0.45
## Valid from : September 2014