Skip to content

Instantly share code, notes, and snippets.

🤺
Programming

José Aguirre josejaguirre

🤺
Programming
Block or report user

Report or block josejaguirre

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
View README.md

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@josejaguirre
josejaguirre / connect.py
Last active Sep 25, 2017
Cadena de conexión para Flask & SQL Alchemy
View connect.py
import urllib
import pyodbc
from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
# Cadena de conexión
string_connection = "DRIVER={SQL Server};Database=DATABASE_NAME;SERVER=SERVER_NAME;UID=USER;PWD=PASSWORD"
string_connection = urllib.parse.quote_plus(string_connection)
string_connection = "mssql+pyodbc:///?odbc_connect=%s" % string_connection
@josejaguirre
josejaguirre / client.js
Created Sep 21, 2017 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
View client.js
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@josejaguirre
josejaguirre / socket-cheatsheet.js
Created Sep 21, 2017 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
View socket-cheatsheet.js
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@josejaguirre
josejaguirre / socket-cheatsheet.js
Created Sep 21, 2017 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
View socket-cheatsheet.js
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@josejaguirre
josejaguirre / One Dark.icls
Created Sep 21, 2017
Intellij Atom One Dark theme
View One Dark.icls
<scheme name="One dark" version="142" parent_scheme="Darcula">
<option name="LINE_SPACING" value="1.2" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors>
<option name="ADDED_LINES_COLOR" value="98c379" />
<option name="CARET_COLOR" value="528bff" />
<option name="CARET_ROW_COLOR" value="2c323b" />
<option name="CONSOLE_BACKGROUND_KEY" value="282c34" />
<option name="DELETED_LINES_COLOR" value="e06c75" />
@josejaguirre
josejaguirre / gist:792ba3782277ef7f22320a9b8a5a90ad
Last active Aug 23, 2017 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.
View gist:792ba3782277ef7f22320a9b8a5a90ad

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate. (Crea el certificado para usar en el servidor: ca.crt)

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@josejaguirre
josejaguirre / gist:840a89376ab71257ff224042c7c4f469
Created Aug 23, 2017 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.
View gist:840a89376ab71257ff224042c7c4f469

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@josejaguirre
josejaguirre / gist:c813fa6d3317cb33d6583627920f706b
Created Jul 14, 2017 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations
View gist:c813fa6d3317cb33d6583627920f706b

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

View gist:a1f7ca37b76d182a14b78554166d151d
2.2.x
Name : Sam
Serial : eJzzzU/OLi0odswsqglOzK0xsjQzNzI2NjA1q3GuMQQAnJAJjw==
3.3.x
Username: personal
eJzzzU/OLi0odswsqilILSrOz0vMqbFEAjXONYY1fu6ufgA/CA4X
You can’t perform that action at this time.