Skip to content

Instantly share code, notes, and snippets.

View ehartmann's full-sized avatar

Eric Hartmann ehartmann

  • Resilience
  • France
View GitHub Profile
@veekas
veekas / slack-dark-theme-instructions.md
Last active March 21, 2019 15:49
Dark theme for Mac Slack App

Dark theme for Mac Slack App

These instructions are my personal implementation of the Slack Black Theme repo. In particular, it is an amalgamation of the css styles in this issue: https://github.com/widget-/slack-black-theme/issues/48

Open ssb-interop.js

Its location will be at /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js

Add the contents of slack-dark-theme.js

@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@cescoffier
cescoffier / git-cleanup.fish
Created August 18, 2015 06:58
A function deleting all git branches that have been merged into the current branch
function cleanup-branches
git branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -d
end
@hgomez
hgomez / jenkins-plugins-batch-install.md
Last active December 11, 2023 07:47
Mass install/update of Jenkins Plugins

Scripted Jenkins Plugins install

Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure.

Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) :

Create a file containing plugins to be installed (or updated), ie iplugins :

@dgageot
dgageot / SEOFilter.java
Created February 15, 2013 14:27
Jersey Filter *Prototype* that uses PhantomJS to retrieve pages asked by Googlebot. This way the javascript is interpreted by phantomjs and it provides a static webpage to Google.
package main;
import com.google.common.base.Strings;
import com.google.common.io.ByteStreams;
import com.sun.jersey.spi.container.ContainerRequest;
import com.sun.jersey.spi.container.ContainerResponse;
import com.sun.jersey.spi.container.ContainerResponseFilter;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@hgomez
hgomez / oracledownload
Last active October 6, 2021 09:58
Oracle JVM download using curl/wget
# Downloading Oracle JVM without browser
Oracle requires you to accept its licence agreement before downloading its JVM.
It's a pain for those of us who do automation, native packages, Jenkins JVM deployment on slave...
I used Firefox and Firebug to sniff network exchanges.
## HTTP Request :
GET /otn-pub/java/jdk/6u39-b04/jdk-6u39-linux-i586.bin?AuthParam=1359814101_9685f919f8b3113a89574ec4570d47b2 HTTP/1.1
@juanje
juanje / gist:3797297
Created September 28, 2012 00:38
Mount apt cache of a Vagrant box in the host to spin up the packages installation

This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.

I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.

def local_cache(basebox_name)
  cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
  partial_dir = cache_dir.join('partial')
  partial_dir.mkdir unless partial_dir.exist?
 cache_dir
@jefmathiot
jefmathiot / coffee.sh
Created September 13, 2012 11:58
Watch for changes on coffeescript files in the current directory and use GruntJS to compile to JS.
#!/bin/bash
# Watch for changes on coffeescript files in the current directory and use GruntJS to compile to JS.
# See http://gruntjs.com
# Require inotify-tools
# Ubuntu : apt-get install inotify-tools
while true ; do \
inotifywait -q *.coffee \