Skip to content

Instantly share code, notes, and snippets.

View Pablohn26's full-sized avatar
🏠
Changing the world while working at (your company)

Pablo Hinojosa Pablohn26

🏠
Changing the world while working at (your company)
View GitHub Profile
@yasuoza
yasuoza / bench_mroonga.rb
Created October 11, 2012 15:10
Benchmark for mroonga
require 'benchmark'
require 'mysql2'
DB_NAME = 'bench_mroonga'
DB_USERNAME = 'username'
DB_USERPASS = 'password'
TABLE_NAME = 'benches'
insert_cols = ['none', 'mysql', 'mroonga'].join(', ')
@nukeador
nukeador / DNS tunneling with iodine.md
Last active October 28, 2024 11:53
How to install and use iodine for DNS tunneling.

This guide provides detailed steps for setting up DNS records, configuring a DNS tunneling server and client, and setting up a browser for secure proxy connections.

Why iodine?

  • Bypassing Network Restrictions: iodine excels in environments with strict network restrictions. It utilizes DNS queries, which are typically allowed through firewalls, to tunnel data where traditional methods like VPNs might be blocked.
  • Efficient for Limited Bandwidth: Ideal for situations with bandwidth limitations, iodine requires less bandwidth compared to standard VPNs, making it a practical choice for networks with restricted data flow.
  • Customizability and Open Source: As an open-source tool, iodine offers extensive customization options. Users with specific technical needs or those interested in a hands-on approach to network tunneling can tailor iodine to their requirements.

Prerequisites

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active November 11, 2024 22:46
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@josefglatz
josefglatz / gitlab-gmail-smtp-example.yml
Created April 7, 2015 15:19
Gitlab Gmail SMTP Configuration Google Apps
# /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_email_from'] = "[email protected]"
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "[email protected]"
gitlab_rails['smtp_password'] = "NicePassword"
gitlab_rails['smtp_domain'] = "owndomain.at"
gitlab_rails['smtp_authentication'] = :plain
@jasonrudolph
jasonrudolph / request.sh
Created April 14, 2015 14:10
Get `starred_at` timestamp for a repository's stargazers via the GitHub API
curl https://api.github.com/repos/atom/atom/stargazers -H 'Accept: application/vnd.github.v3.star+json'
@simonmd
simonmd / Readme.md
Last active May 26, 2020 16:33
DICOM Widget for Dashing

Description

Simple Dashing widget (and associated files) to display DICOM server checks.

##Dependencies

dicom

Add it to dashing's gemfile:

@protrolium
protrolium / ffmpeg.md
Last active November 12, 2024 21:27
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@halberom
halberom / opt1_template.j2
Last active October 11, 2024 16:44
ansible - example of template if else
{# style 1 - long form #}
{% if filepath == '/var/opt/tomcat_1' %}
{% set tomcat_value = tomcat_1_value %}
{% else %}
{% set tomcat_value = tomcat_2_value %}
{% endif %}
{# style 2 - short form #}
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %}
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active November 4, 2024 04:45
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
@olih
olih / jq-cheetsheet.md
Last active November 18, 2024 01:10
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq