Skip to content

Instantly share code, notes, and snippets.

View hslavich's full-sized avatar

Hernán Slavich hslavich

  • Buenos Aires, Argentina
View GitHub Profile
@hslavich
hslavich / xrandr.sh
Created October 9, 2017 18:41 — forked from debloper/xrandr.sh
Add system unrecognized but monitor supported resolution in X
#!/bin/bash
# First we need to get the modeline string for xrandr
# Luckily, the tool `gtf` will help you calculate it.
# All you have to do is to pass the resolution & the-
# refresh-rate as the command parameters:
gtf 1920 1080 60
# In this case, the horizontal resolution is 1920px the
# vertical resolution is 1080px & refresh-rate is 60Hz.
@hslavich
hslavich / 10-apache-filter.conf
Last active April 10, 2020 21:05
Logstash filters
filter {
if [type] == "apache_access" {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
}
@hslavich
hslavich / matrixish.sh
Last active November 25, 2017 01:22 — forked from ttscoff/matrixish.sh
#!/bin/bash
#
# matrix: matrix-ish display for Bash terminal
# Author: Brett Terpstra 2012 <http://brettterpstra.com>
# Contributors: Lauri Ranta and Carl <http://blog.carlsensei.com/>
#
# A morning project. Could have been better, but I'm learning when to stop.
### Customization:
blue="\033[0;34m"
from locust import HttpLocust, TaskSet, task
import re
class MyTaskSet(TaskSet):
def on_start(self):
self.login()
def login(self):
r = self.client.get("/")
response = self.client.post(r.url, {
@hslavich
hslavich / gist:4388978
Created December 27, 2012 15:07
hex2ascii
echo "5A 30 30 30 32 43 46 42 37 35 41 38 32" | perl -nle 'print join "", map { chr hex $_ } split " ";'
@hslavich
hslavich / bootstrap_dropdownhover.css
Created September 27, 2012 20:04
Twitter bootstrap menu dropdown on hover
a.menu:after, .dropdown-toggle:after {
content: none;
}
ul.nav li.dropdown:hover ul.dropdown-menu {
display: block;
margin: 0;
}