Skip to content

Instantly share code, notes, and snippets.

View judu's full-sized avatar

Julien Durillon judu

  • Clever Cloud
  • Nantes
View GitHub Profile
@judu
judu / install-cups-drivers-mfc9330cdw-exherbo.md
Created September 11, 2019 20:51
Install cups driver for Brother MFC-9330CDW on Exherbo

Install cups drivers for Brother MFC-9330CDW On Exherbo

You will need

  • gcc
  • make
  • app-arch/rpm2targz
  • patchelf
  • an i686-pc-linux-gnu ld-linux.so.2
POOL_NAME USED OBJECTS CLONES COPIES MISSING_ON_PRIMARY UNFOUND DEGRADED RD_OPS RD WR_OPS WR
.rgw.root 0 B 0 0 0 0 0 0 0 0 B 0 0 B
clevercloud.rbd.addons 0 B 0 0 0 0 0 0 0 0 B 0 0 B
default.rgw.buckets.data 0 B 0 0 0 0 0 0 0 0 B 0 0 B
default.rgw.buckets.index 0 B 0 0 0 0 0 0 0 0 B 0 0 B
default.rgw.buckets.non-ec 0 B 0 0 0 0 0 0 0 0 B 0 0 B
default.rgw.control 0 B 0 0 0 0 0 0 0 0 B 0 0 B
default.rgw.log 0 B 0 0 0 0 0 0 0 0 B 0 0 B
default.rgw.meta 0 B 0 0 0 0 0 0 0 0 B 0 0 B
@judu
judu / ProxiedRequest.java
Created November 10, 2014 17:56
Initialize Http proxy with preemptive Basic auth.
final String THE_HOST = "…";
final String THE_PORT = 8080;
final String THE_USERNAME = "…";
final String THE_PASSWORD = "…";
final AuthCache authCache = new BasicAuthCache();
final URI uri = new URI("…");
// CREATE CREDENTIALS PROVIDER, WHICH IS A MAP [HOST -> CREDS]
CredentialsProvider credsProvider = new BasicCredentialsProvider();
credsProvider.setCredentials(new AuthScope(THE_HOST, AuthScope.ANY_PORT), new UsernamePasswordCredentials(THE_USERNAME, THE_PASSWORD));

Keybase proof

I hereby claim:

  • I am judu on github.
  • I am judu (https://keybase.io/judu) on keybase.
  • I have a public key whose fingerprint is 84A5 D720 9AF6 4D8C A02A 5DC1 7578 A93B 2EF2 B77D

To claim this, I am signing this object:

@judu
judu / tmux: settitle
Last active August 29, 2015 14:01
Set the hostname to the first enclosing tmux when ssh-ing to a server. This snippet has to be put into the .bashrc *of the server*
# On the Server
## In .bashrc (or .zshrc)
```
settitle() {
printf "\033k$1\033\\"
}
settitle "`hostname`"
```
@judu
judu / Germinal themes
Last active May 12, 2023 22:11
Gnome terminal / Germinal / Sakura color scheme based on solarized.Dark and light colors are the same, but black/darkgrey and lightgrey/white.
## Solarized
['#002B36', '#DC322F', '#859900', '#B58900', '#268BD2', '#D33682', '#2AA198', '#EEE8D5', '#586E75', '#DC322F', '#859900', '#B58900', '#268BD2', '#D33682', '#2AA198', '#FDF6E3']
### Another Solarized version where violet is dark magenta and orange is dark red:
['#002B36','#CB4B16','#859900','#B58900','#6C71C4','#D33682','#2AA198','#EEE8D5','#586E75','#DC322F','#859900','#B58900','#268BD2','#D33682','#2AA198','#FDF6E3']
###Solarized "Official" version (that I actually use since 2020) :
['#073642', '#DC322F', '#859900', '#B58900', '#268BD2', '#D33682', '#2AA198', '#EEE8D5', '#002B36', '#CB4B16', '#586E75', '#657B83', '#839496', '#6C71C4', '#93A1A1', '#FDF6E3']
@judu
judu / repack-tmux
Created April 15, 2012 15:23
Pack the tmux windows, keeping the order.
#!/bin/bash
# you can use it from tmux
# bind-key P run repack-tmux
ttt () {
local bef=-1
for i in `tmux list-windows | cut -d':' -f1`; do
local b=$(($bef + 1))
if [ $b -lt $i ]; then
tmux move-window -s $i -t $b
@judu
judu / git-init-mvn
Created April 3, 2012 12:56
git init repo in maven project
#!/bin/bash
# Ensure target is never committed
echo "target" >> .gitignore
git init
# Because there will always be at least these three files/folders in
# a maven project
git add src pom.xml .gitignore