Skip to content

Instantly share code, notes, and snippets.

@Siedrix
Siedrix / snippet.md
Last active September 3, 2018 16:33
Certbot wildcard subdomains
git clone https://github.com/certbot/certbot
cd certbot
git checkout v0.22.0
sudo ./certbot-auto --os-packages-only
./tools/venv.sh
source venv/bin/activate
certbot -d *.domain.com --manual --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory certonly
@Siedrix
Siedrix / spec.md
Last active June 6, 2016 16:58
The imposible project

Objetivo del evento:

  • Aprender a hacer landing pages.

Metricas a juzgar:

  • Que tan poco viable es la idea. Mientras menos viable y mas sci-fi, mejor.
  • Hacer una landing page que venda esta idea y convenza de comprar esta idea.

Posibles ideas:

@Siedrix
Siedrix / cacheless-server.js
Created May 13, 2016 15:45
Koa cache server
const koa = require('koa')
const Router = require('koa-router')
const request = require('request-promise')
const app = koa()
const router = new Router()
router.get('/', function *(next) {
var body = yield request({
@Siedrix
Siedrix / nginx-sample
Created February 20, 2016 23:07
nginx-sample
upstream siedrixServer {
server localhost:4000;
}
server {
listen 80;
server_name siedrix.com;
root /home/ubuntu/siedrix;
@Siedrix
Siedrix / ejercicio-1.js
Created January 24, 2016 15:16
Ejercicios de la tarea 1
var inquirer = require('inquirer')
var valorAAdivinar = 6
inquirer.prompt([
{
type:'input',
name:'adivina',
message:'Elije un numero del 1 al 10'
}
], function (answers) {
@Siedrix
Siedrix / client.js
Created April 6, 2015 14:07
Tutum websocket examples
var WebSocket = require('ws');
var userPublicToken = 'apikey';
var username = 'username';
var ws = new WebSocket('wss://stream.tutum.co/v1/events?token='+ userPublicToken +'&user=' +username);
ws.on('open', function() {
console.log('Connected');
});
@Siedrix
Siedrix / backbone.widget.js
Last active August 29, 2015 14:09
Backbone.Widget
Backbone.Widget = function() {
this.initialize.apply(this, arguments);
};
_.extend(Backbone.Widget.prototype, Backbone.Events, {
initialize : function(){},
});
Backbone.Widget.extend = Backbone.View.extend;
@Siedrix
Siedrix / add-register.py
Created September 7, 2014 21:21
Redbird example with adding host with redis
import redis
import json
register = {
"src" : "nodebots-dev.mx",
"target" : "http://127.0.0.1:4500/"
}
registerAsStr = json.dumps(register)
@Siedrix
Siedrix / bower.json
Created August 24, 2014 21:47
Backbone urls
{
"name": "url-patterns",
"version": "0.0.0",
"authors": [
"Siedrix <[email protected]>"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
@Siedrix
Siedrix / bower.json
Created July 20, 2014 23:42
Example of Backbone and React working together
{
"name": "backbone-react-example",
"version": "1.0.0",
"authors": [
"Siedrix <[email protected]>"
],
"description": "backbone react todo list",
"license": "MIT",
"dependencies": {
"backbone": "~1.1.2",