Skip to content

Instantly share code, notes, and snippets.

Avatar
🤮
puke nuke

Victor Borja vic

🤮
puke nuke
View GitHub Profile
@vic
vic / cat
Last active Apr 30, 2021
Create an exhibition with bits, due on Thu, Jul 20, 2017 $ cat /bin/cat | xxd --bits
View cat
0000000: 11001111 11111010 11101101 11111110 00000111 00000000 ......
0000006: 00000000 00000001 00000011 00000000 00000000 10000000 ......
000000c: 00000010 00000000 00000000 00000000 00010000 00000000 ......
0000012: 00000000 00000000 01010000 00000110 00000000 00000000 ..P...
0000018: 10000101 00000000 00100000 00000000 00000000 00000000 .. ...
000001e: 00000000 00000000 00011001 00000000 00000000 00000000 ......
0000024: 01001000 00000000 00000000 00000000 01011111 01011111 H...__
000002a: 01010000 01000001 01000111 01000101 01011010 01000101 PAGEZE
0000030: 01010010 01001111 00000000 00000000 00000000 00000000 RO....
0000036: 00000000 00000000 00000000 00000000 00000000 00000000 ......
@vic
vic / gist:1f2dc6201cbe55b358c9c29f2af39851
Created Jul 1, 2020
Mill not generating sourcemaps when using scalajs >= 1.
View gist:1f2dc6201cbe55b358c9c29f2af39851
❯ ./mill scalajslib.test 'mill.scalajslib.HelloJSWorldTests.fastOpt'
[94/356] scalajslib.worker[1].compile
[info] Compiling 1 Scala source to /h/mill/out/scalajslib/worker/1/compile/dest/classes ...
[warn] 1 deprecation (since 2.13.0); re-run with -deprecation for details
[warn] one warning found
[info] Done compiling.
[221/356] main.core.compile
[info] Compiling 1 Scala source to /h/mill/out/main/core/compile/dest/classes ...
[info] Done compiling.
[356/356] scalajslib.test.test
View keybase.md

Keybase proof

I hereby claim:

  • I am vic on github.
  • I am oeiuwq (https://keybase.io/oeiuwq) on keybase.
  • I have a public key ASDl3QUhn_Iv58GAMXdWpgBTMfK7AB_NVO7Kfd37fv2zPgo

To claim this, I am signing this object:

View levenshtein.sql
DROP FUNCTION IF EXISTS levenshtein;
DELIMITER $$
CREATE FUNCTION `levenshtein`( s1 text, s2 text) RETURNS int(11)
DETERMINISTIC
BEGIN
DECLARE s1_len, s2_len, i, j, c, c_temp, cost INT;
DECLARE s1_char CHAR;
DECLARE cv0, cv1 text;
SET s1_len = CHAR_LENGTH(s1), s2_len = CHAR_LENGTH(s2), cv1 = 0x00, j = 1, i = 1, c = 0;
IF s1 = s2 THEN
@vic
vic / ex14parens.rb
Created Dec 9, 2016
Add missing parentheses to avoid Elixir 1.4 warnings on function calls.
View ex14parens.rb
#!/usr/bin/env ruby
###
# This utility adds missing parentheses to single word function calls
# that are now treated as warnings on Elixir 1.4.
#
# Download this file on your project repo and execute
# ruby ex14parens.rb --help
####
require('fileutils')
@vic
vic / README.md
Last active Apr 3, 2018
Rebecca iterm2 colors
View README.md

Install d12frosted/emacs-plus on mac patched for rich colors on terminals supporting direct color (like iterm2).

brew install emacs-plus --with-24bit-color

Generate the terminfo (see attached .src file)

Then run emacs/emacsclient with TERM set to xterm-24bits

@vic
vic / ytpls.sh
Last active Feb 2, 2018
Save a YouTube list as a playlist of videos.
View ytpls.sh
#!/usr/bin/env bash
#
# ytpls.sh - Save a YouTube list as a playlist of videos.
#
#
# Doesnt actually download the videos, it just creates a playlist file `.pls` containing each video url.
# You can open such files with VLC or other media player on desktop and mobile.
#
#
# USAGE
View redy.js
/**
* Redy - a prototype for a ruby like javascript.
* Parts of this software are derived from JS.Class by James Coglan.
*
*
* This file is licensed under the Ruby licenense.
* Copyright 2008. Victor Hugo Borja <vic.borja gmail.com>
*/
Redy = {
View 0001-Link-with-rdynamic-so-that-dlopen-for-TestNativeFun.patch
View type.yaml
2017-01-01:
2017-01-02:
2017-01-03:
2017-01-04:
2017-01-05:
2017-01-06:
2017-01-07:
2017-01-08: