Skip to content

Instantly share code, notes, and snippets.

Pablo Albornoz fixmycode

  • Santiago, Chile.
Block or report user

Report or block fixmycode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fixmycode
fixmycode / README.md
Last active Jan 26, 2018
Despliegue de Django en HTTPS
View README.md

Prefacio

Esta guía asume que tienes una aplicación en Django que opera dentro de un entorno virtual. También se asume que usas Ubuntu u otra distro basada en Debian pero no es requisito.

Requisitos

@fixmycode
fixmycode / bookly.css
Created Jul 27, 2015
Como agrego Brandon Grotesque como fuente en Bookly
View bookly.css
/* primero crea una carpeta, vas a necesitarla para guardar las fuentes
luego ocupas la ruta para llamar a cada archivo fuente, en mi caso, es '/assets/fonts/' */
@font-face{
font-family: Brandon;
font-weight: 200;
src: url(/assets/fonts/Brandon_light.otf) format("opentype")
}
@font-face{
@fixmycode
fixmycode / gzip.md
Last active Aug 29, 2015
gzip in Mac: a guide
View gzip.md

Gzip is an implementation of the Lempel-Ziv coding algorithm, it compresses files. The Mac OS X implementation of gzip varies a little from their *nix counterparts and it's a little tricky to use so I made this little guide to help myself. If I messed something up, please fork it and fix it!.

Compressing

The most basic command will compress the file filename.ext and then replace it with filename.ext.gz in the same directory.

gzip filename.ext

If you don't want to lose your original file, then you need to pipe the output of gzip -c to a file.

View gist:11130879
private void processRequest() throws Exception {
InputStream is = socket.getInputStream(); //obtiene la entrada del socket
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); //se crea un nuevo stream donde almacenar la entrada
int ch; //un caracter de lectura
while((ch = is.read()) != -1) { //mientras que el caracter leído desde el stream sea distinto de -1, cosa que no debería pasar nunca (es igual a que si le hubiese puesto while(true), pero necesitamos que en cada ciclo lea un caracter.
outputStream.write(ch); //se escribe ese caracter en el nuevo stream
if (ch == '\n') { //si el caracter leído es un salto de linea...
ch = is.read(); //lee otro caracter más
if (ch == '\n' || ch == '\r') //y si ese caracter adicional también es un salto de linea...
@fixmycode
fixmycode / wsp-guide
Last active Dec 12, 2015
This is sort of a translation guide to the "Weiss Schwarz Portable" game for the PSP. It's an HTML page with embedded graphics for the buttons.
View wsp-guide
<!doctype html>
<html>
<head>
<title>Weiβ Schwarz Portable Guide</title>
<meta Name="author" Content="Pablo Albornoz fixmycode@github"/>
<meta HTTP-EQUIV="Content-Type" Content="text/html; charset=UTF-8"/>
<style>
body {
font-family: sans-serif;
font-size: 11pt;
You can’t perform that action at this time.