Skip to content

Instantly share code, notes, and snippets.

View wvides's full-sized avatar
:octocat:
Immutable is the way

Walter Vides wvides

:octocat:
Immutable is the way
  • Berlin, Germany
View GitHub Profile
@wvides
wvides / scanner.sh
Created July 28, 2020 13:44 — forked from andyrbell/scanner.sh
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@wvides
wvides / snake.py
Created November 18, 2019 12:52 — forked from sanchitgangwar/snake.py
Snakes Game using Python
# SNAKES GAME
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
curses.initscr()
win = curses.newwin(20, 60, 0, 0)
@wvides
wvides / ssh-tunnel-proxy-digitalocean.md
Created June 10, 2019 06:10 — forked from nathanleclaire/ssh-tunnel-proxy-digitalocean.md
A description of how to get started using SSH tunneling. Intended for subverting network shaping and other nasty things imposed on you by arbitrary networks.

This is a method to create a proxy which is pretty simple and does not involve using shady websites or proprietary applications, etc.

  1. First, create a server, such as a DigitalOcean droplet.

  2. Once the server is created, verify that you can login via SSH:

    $ ssh user@<ip>
    
  3. If that is working, creating a local [SOCKS5] proxy using OpenSSH is just one command. Here is one suggestion:

@wvides
wvides / setup-mysql.sh
Created August 17, 2018 21:42 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@wvides
wvides / crockford_object_creation_pattern.js
Created August 8, 2018 02:45 — forked from stonehippo/crockford_object_creation_pattern.js
Douglas Crockford's preferred Javascript object constructor pattern, from https://www.youtube.com/watch?v=bo36MrBfTk4 (starting at 35:45)
// The pattern Crockford uses these days.
function constructor(spec) {
var that = other_constructor(spec),
member,
method = function () {
// spec, member, method
}
that.method = method;
return that;
}
println "Running plugin enumerator"
println ""
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins()
plugins.each {println "${it.getShortName()}:${it.getVersion()}"}
println ""
println "Total number of plugins: ${plugins.size()}"