Skip to content

Instantly share code, notes, and snippets.

View b-babic's full-sized avatar
🎯
Focusing

Benjamin Babic b-babic

🎯
Focusing
  • Progressive studio
View GitHub Profile
@boreycutts
boreycutts / i3-gaps_installation_guide.md
Last active November 11, 2024 11:55
A simple installation guide for i3-gaps

Installing i3-gaps

Dependencies

i3-gaps has some packages that are required for it to work so install these things:

sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake

You also need to install libxcb-xrm-dev, but I got Unable to locate package libxcb-xrm-dev when trying to install from the apt repositories on Ubuntu 16.04. If this happens to you, just install it from source using these commands:

mkdir tmp
#---- Generated by tint2conf adf9 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Gradients
# Gradient 1
gradient = vertical
start_color = #000000 0
end_color = #000000 0
@nerd
nerd / config.h
Created November 28, 2017 16:27
2bwm yuno config
///---User configurable stuff---///
///---Modifiers---///
#define MOD XCB_MOD_MASK_4 /* Super/Windows key or check xmodmap(1) with -pm*/
///--Speed---///
/* Move this many pixels when moving or resizing with keyboard unless the window has hints saying otherwise.
*0)move step slow 1)move step fast
*2)mouse slow 3)mouse fast */
static const uint16_t movements[] = {20,40,15,400};
/* resize by line like in mcwm -- jmbi */
static const bool resize_by_line = true;
@rameshkumarxyz
rameshkumarxyz / request.js
Created November 24, 2017 10:14 — forked from sheharyarn/request.js
Axios Request Wrapper for React
/**
* Axios Request Wrapper
* ---------------------
*
* @author Sheharyar Naseer (@sheharyarn)
* @license MIT
*
*/
import axios from 'axios'
@philmander
philmander / nav.jsx
Last active August 1, 2020 15:49
Simple Preact Unit Testing with Jest (with shallow rendering)
import { h, Component } from 'preact';
import { Link } from 'preact-router/match';
class Nav extends Component {
constructor() {
super();
this.state.title = 'Navigation'
}
@paulsturgess
paulsturgess / service.js
Last active March 15, 2026 18:46
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}
@CodeMyUI
CodeMyUI / expanding-column-layout.markdown
Created January 5, 2017 06:12
Expanding Column Layout

Expanding Column Layout

A resposive expanding column layout to present projects, articles, and more.

A Pen by Ettrics on CodePen.

License.

@doubtingben
doubtingben / gist:60a228c06a48a5b8601ea5e94e4ab22c
Created November 9, 2016 17:20
Install i3-gaps on Ubuntu 16
Install i3-gaps on Ubuntu 16
apt-get install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev dh-autoreconf
git clone --recursive https://github.com/Airblader/xcb-util-xrm.git
cd xcb-util-xrm/
./autogen.sh
make
sudo make install
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active March 18, 2026 03:38
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@mgoral
mgoral / pydetect
Created October 23, 2014 05:52
xrandr wrapper
#!/usr/bin/env python
import optparse
from subprocess import Popen, PIPE
import time
def prepare_options():
"""Define optparse options."""
optp = optparse.OptionParser(
usage = 'Usage: %prog OUT1 [OUT2 OUT3...]\n\tOUT[n] are devices taken from left to right.',