Skip to content

Instantly share code, notes, and snippets.

View rohshall's full-sized avatar

Salil Wadnerkar rohshall

  • United States
View GitHub Profile
@jinyeow
jinyeow / bspwmrc
Last active November 7, 2022 13:30
Config files related to bspwm and panel (lemonbar)
#!/bin/zsh
ws1= # main
ws2= # web
ws3= # mail
ws4= # code
ws5= # math [infinity]  (term icon)
ws6= # media
ws7= # misc  (9 squares icon)
ws8= # notes/docs  (pdf icon)
@ytjohn
ytjohn / crash.log
Created March 11, 2016 14:28
nouveau
(EE) Backtrace:
(EE) 0: /usr/bin/X (xorg_backtrace+0x4e) [0x55ace80e168e]
(EE) 1: /usr/bin/X (mieqEnqueue+0x253) [0x55ace80c3373]
(EE) 2: /usr/bin/X (QueuePointerEvents+0x52) [0x55ace7f9d152]
(EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x60a7) [0x7f8f174800a7]
(EE) 4: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x687d) [0x7f8f1748087d]
(EE) 5: /usr/bin/X (0x55ace7f2d000+0x96ac8) [0x55ace7fc3ac8]
(EE) 6: /usr/bin/X (0x55ace7f2d000+0xbfc92) [0x55ace7fecc92]
(EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (0x7f8f20a53000+0x352f0) [0x7f8f20a882f0]
(EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (ioctl+0x7) [0x7f8f20b50067]
@nbyouri
nbyouri / brightness.c
Last active November 21, 2022 04:07
Get/Set screen brightness value on NetBSD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/sysctl.h>
#include <inttypes.h>
bool device_enabled(char *);
char *find_device(void);
int get_brightness(char *);
@rkitover
rkitover / prompt.sh
Last active February 22, 2021 23:28
simple version of bash git prompt for ksh (also works in bash) (raw escape, click raw and fetch the gist URL with curl or wget)
shopt -s checkwinsize 2>/dev/null
_cmd_status() {
if [ $? -eq 0 ]; then
printf '\001\002✔'
else
printf '\001\002✘'
fi
}
@mattmccarty
mattmccarty / sublime-3-maven-build
Created March 8, 2017 00:40
Maven Build System for Sublime Text 3
#
# Tools -> Build System -> New Build System
# Paste the snippet below in the file that opens
# Save as "Maven.sublime-build" in ~/.config/sublime-text-3/Packages/User
# Ctrl+Shift+P will show all maven commands in snippet below if you start to type "Maven"
# Open a pom.xml file and execute a command
#
{
"working_dir": "$file_path",
"shell_cmd":"mvn clean install",
@avitevet
avitevet / diet.cpp
Created April 6, 2017 00:05
Using linear programming/simplex method to solve the diet problem: given a set of foods with nutritional data, and a set of nutritional constraints, find the cheapest combination of foods that meets your nutritional needs.
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdio>
#include <cassert>
using namespace std;
typedef double ElementType;
typedef vector<vector<ElementType>> matrix;
@rodricels
rodricels / .tmux.conf
Last active May 12, 2025 18:14
tmux configuration, mouse copy & paste added
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf
# Scroll History
set -g history-limit 50000
# show messages for 4 seconds instead
set -g display-time 4000
# set first window to index 1 (not 0) to map more to the keyboard layout
set-option -g renumber-windows on
@andrevmatos
andrevmatos / issue
Created April 21, 2019 19:18
Arch Linux /etc/issue

      ### ### ##
    ## ##
┌ #### ### ###   ####   ## ### ## ### ### ### ### ###  ### ###
│  ##  ### ##  ##   ###  [1;37;
@bbqtd
bbqtd / macos-tmux-256color.md
Last active June 4, 2025 17:47
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):