Skip to content

Instantly share code, notes, and snippets.

View hilios's full-sized avatar
🛠️
Breaking stuff

Edson Hilios hilios

🛠️
Breaking stuff
View GitHub Profile
@hilios
hilios / Dockerfile
Last active August 29, 2015 14:26
Build mosquitto from source for Docker
FROM debian:jessie
MAINTAINER Edson Hilios <edson.hilios.com.br>
RUN apt-get update -y
RUN apt-get install -y wget
# Install libwebsockets
RUN apt-get install -y cmake libssl-dev
RUN mkdir -p /build/libwebsockets
WORKDIR /build/libwebsockets

How to set a fix IP in Intel Edsion

Edit the file /etc/wpa_supplicant/wpa_cli-actions.sh around the line 50.

$ vim /etc/wpa_supplicant/wpa_cli-actions.sh

Close to the line 50 change it to this.

@hilios
hilios / nginx.ini
Last active August 29, 2015 14:23
Nginx Systemd
[Unit]
Description=Nginx Docker Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker run --name %n -d -p 80:80 -p 443:443 -v /etc/nginx:/etc/nginx -v /var/nginx/html:/usr/share/nginx/html nginx
@hilios
hilios / gis.py
Last active August 29, 2015 14:21
Geographic Information Algorithms
# -*- coding: utf-8 -*-
import math
import re
from decimal import Decimal
# SAD-69 World Datum
A = 6378160
E2 = 0.00669454185
@hilios
hilios / sample
Created May 6, 2015 12:04
Sodoku solver
$ sudoku
Row[1] : ---------
Row[2] : -----3-85
Row[3] : --1-2----
Row[4] : ---5-7---
Row[5] : --4---1--
Row[6] : -9-------
Row[7] : 5------73
Row[8] : --2-1----
Row[9] : ----4---9
@hilios
hilios / exercicio-1.py
Last active April 7, 2024 12:33
Instituto Mauá de Tecnologia - Trabalho prático I (http://bit.ly/1D8yncN)
# -*- coding: utf-8 -*-
"""1) Construa um algoritmo que, tendo como dados de entrada dois
pontos quaisquer no plano, P(x1,y1) e P(x2,y2), escreva a distância
entre eles. A fórmula que efetua tal cálculo:
d = sqrt(Δx^2 + Δy^2)
"""
import lib
import math
def distancia(p1, p2):
@hilios
hilios / README.md
Last active September 8, 2024 22:39
ngPageTitle - AngularJS page title service

$pageTitle

Allows to control the page title from the AngularJS route system, controllers or any other component through an injectable service.

ngPageTitle - Page title service (run tests)

To get started add the module to your app and configure the page title provider:

@hilios
hilios / .zshrc
Last active November 4, 2019 14:35
Colored cli shell output
# Java
export JAVA_HOME=`/usr/libexec/java_home -v '10'`
export JAVA_OPTIONS="-Xms1024m -Xmx4G -Xss256m"
@hilios
hilios / Gruntfile.js
Created March 9, 2014 21:11
Grunt builmap task
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
buildmap: {
files: ['<%= source.root %>'],
dest: '<%= source.dest %>'
}
});
grunt.registerTask('default', ['buildmap'], function() {
@hilios
hilios / _formset_template.html
Last active October 26, 2017 15:34
AngularJS Django Formset
<div django-formset-child>
{{form.as_p}}
<button django-formset-remove>Remove</button>
</div>