Skip to content

Instantly share code, notes, and snippets.

View japaz's full-sized avatar
🏠
Tired of ...

Alberto Paz Jimenez japaz

🏠
Tired of ...
View GitHub Profile

Keybase proof

I hereby claim:

  • I am japaz on github.
  • I am japaz (https://keybase.io/japaz) on keybase.
  • I have a public key whose fingerprint is D2EA 09A8 4001 DE12 31EE 7EE2 4D4C F3D6 8509 FAA0

To claim this, I am signing this object:

@japaz
japaz / cisco.osascript
Last active October 25, 2018 17:35 — forked from ahebrank/cisco.osascript
Automate Cisco AnyConnect VPN client with lastpass on OSX
-- 1. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 2. Enable Applescript Editor
-- Usage: <script> gatewayHostName password
-- based on https://gist.github.com/andrewh/7135352 and https://github.com/seanfisk/juniper-network-connect-vpn-applescript/blob/master/juniper.applescript
on run argv
if (count of argv) is not equal to 2 then
return "Usage: <script> gatewayHostName password"
else
#compdef rscreen
# rscreen autocompletion for oh-my-zsh
# Requires: rscreen installed
_ssh
_arguments \
':hosts:_ssh_hosts' \
&& return 0
@japaz
japaz / rscreen
Last active November 11, 2020 13:04
Improved rscreen from autossh
#!/bin/sh
#
# sample script to use autossh to open up a remote screen
# session, or reconnect to an existing one.
#
# $Id: rscreen,v 1.4 2002/05/07 17:54:13 harding Exp $
#
if [ "X$1" = "X" ]; then
echo "usage: `basename $0` <host>"
exit 1
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
@japaz
japaz / Pouring.scala
Last active December 17, 2015 05:49 — forked from yankov/gist:5538283
package week7
class Pouring(capacity: Vector[Int]) {
// States
type State = Vector[Int]
val initialState = capacity map (x => 0)
// Moves
@japaz
japaz / logformat.txt
Created June 7, 2012 14:53
Web Server Stress Testing with Curl
%{url_effective},%{http_code},%{content_type},%{time_total},%{time_connect},%{time_starttransfer},%{size_download}\n
@japaz
japaz / .screenrc
Created December 22, 2011 15:59
Example .screenrc
defscrollback 5000
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
@japaz
japaz / .Xdefaults
Created December 16, 2011 10:19
Solarized colors for x-term on Cygwin
!! drop in Solarized colorscheme for Xresources/Xdefaults
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
!!--------- ------- ---- ------- ----------- ---------- ----------- -----------
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
@japaz
japaz / console.xml
Created December 16, 2011 10:07
Solarized colors for Console2
<!-- Solarized colors configuration for console2 -->
<!-- http://ethanschoonover.com/solarized -->
<!-- http://sourceforge.net/projects/console/ -->
<!-- Replace this colors in console.xml configuration file -->
<colors>
<color id="0" r="7" g="54" b="66"/>
<color id="1" r="38" g="139" b="210"/>
<color id="2" r="133" g="153" b="0"/>
<color id="3" r="42" g="161" b="152"/>
<color id="4" r="220" g="50" b="47"/>