Skip to content

Instantly share code, notes, and snippets.

@AlexisLeon
AlexisLeon / main.go
Created June 11, 2020 17:43 — forked from spksoft/main.go
Example Golang worker with rabbitMQ graceful shutdown
package main
import (
"flag"
"log"
"os"
"os/signal"
"syscall"
"time"
@AlexisLeon
AlexisLeon / send-sms.go
Created August 23, 2019 10:05 — forked from ivajloip/send-sms.go
Sending an SMS Text Message using AWS SNS service in GoLang
//assumes you have the following environment variables setup for AWS session creation
// AWS_SDK_LOAD_CONFIG=1
// AWS_ACCESS_KEY_ID=XXXXXXXXXX
// AWS_SECRET_ACCESS_KEY=XXXXXXXX
// AWS_DEFAULT_REGION=us-east-1
package main
import (
"fmt"
@AlexisLeon
AlexisLeon / react-native.js
Created April 16, 2018 05:19 — forked from lelandrichardson/react-native.js
React Native flow types
declare var __DEV__: boolean;
declare module 'react-native' {
declare type Color = string | number;
declare type Transform =
{ perspective: number } |
{ scale: number } |
{ scaleX: number } |
@AlexisLeon
AlexisLeon / react-native.js
Created April 16, 2018 05:19 — forked from lelandrichardson/react-native.js
React Native flow types
declare var __DEV__: boolean;
declare module 'react-native' {
declare type Color = string | number;
declare type Transform =
{ perspective: number } |
{ scale: number } |
{ scaleX: number } |
@AlexisLeon
AlexisLeon / dh-usage.js
Last active January 22, 2018 18:54 — forked from durango/dh-usage.js
[nodejs][javascript] Diffie-Hellman key exchange by nodejs-0.5
// node.js 0.5 Diffie-Hellman example
var assert = require("assert");
var crypto = require("crypto");
// the prime is shared by everyone
var server = crypto.createDiffieHellman(512);
var prime = server.getPrime();
// sharing secret key on a pair
git tag archive/<your-branch> <your-branch>
git push --tags
git push -d origin <your-branch>
git branch -D <your-branch>
@AlexisLeon
AlexisLeon / homebridge
Created July 18, 2017 00:08 — forked from johannrichard/homebridge
Systemd Service for homebridge (http://github.com/nfarina/homebridge)
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@AlexisLeon
AlexisLeon / bluetooth_serial.md
Created July 17, 2017 23:55 — forked from 0/bluetooth_serial.md
Connecting a Bluetooth device for serial communication on Arch Linux.

The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.

Prerequisites

The following packages are required:

  • bluez: bluetoothd
  • bluez-utils: bluetoothctl, rfcomm
@AlexisLeon
AlexisLeon / README-Template.md
Created July 13, 2017 01:44 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

<VirtualHost *:443>
ServerName google.com.mx
ServerAdmin webmaster@google.com
DocumentRoot /var/www/html/app/public
<Directory /var/www/html/app>
AllowOverride All
</Directory>