Skip to content

Instantly share code, notes, and snippets.

Avatar
🌄
Trying to help the World

Lucas M. Dutra terremoth

🌄
Trying to help the World
  • Imaginum Softworks
  • Florianópolis, SC - Brazil
View GitHub Profile
@ryansmith94
ryansmith94 / mvc.coffee
Last active Sep 10, 2017
Example of "true" MVC
View mvc.coffee
# Model contains "operations related to the application domain" [1].
class Model
route: document.location.href.split('#').slice(1).join('#')
listeners: []
getRoute: () -> @route
setRoute: (route) ->
@route = route
@change()
change: () -> @listeners.forEach(@runListener)
onChange: (listener) -> @listeners.push(listener)
@onlurking
onlurking / book.py
Last active Mar 4, 2018
crawl elder scrolls books and save as markdown (WIP)
View book.py
from splinter import Browser
from bs4 import BeautifulSoup
import tomd
from html_sanitizer import Sanitizer
# pip install tomd splinter html-sanitizer beautifulsoup4
browser = Browser(
'chrome', user_agent="Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)")
@ProgDan
ProgDan / MinhaJanela.java
Created Aug 31, 2012
Exemplo: FlowLayout
View MinhaJanela.java
import java.awt.*;
import javax.swing.*;
public class MinhaJanela extends JPanel {
public MinhaJanela(){
/* Conjunto de linhas (alinhamento à esquerda) */
//FlowLayout fluxo = new FlowLayout();
/* Conjunto de linhas (alinhamento à direita) */
//FlowLayout fluxo = new FlowLayout(FlowLayout.LEFT);
/* Conjunto de linhas (alinhamento centralizado,
View sudo-example.json
[
{
"id":1,
"hash":"5ba92bd1032f6721f7055e8d",
"birthdate":"1999-08-05T03:00:00.000Z",
"Wallet":[
{
"id":1,
"address":"15rKHfPAXmzKV9YnqeJUpwvtnQkFk4xN6K",
"hash":"5D68217D0C3DDFC029F1F8F2E61A80A8256342F27893FF0FE55DA861E75325D6F7C805A26CAE587F01AEE7980700E8F06422C233A0E2A8E9BF26AAD0C39E00C6",
@onlurking
onlurking / docker.md
Last active Nov 19, 2018
Docker Mastery Notes
View docker.md

Docker

First lecture

Verify if cli can talk to Docker engine.

docker version

View Docker engine config values.

@amandalima
amandalima / checa_mobile.js
Last active Dec 3, 2018
Função que verifica se o dispositivo é mobile
View checa_mobile.js
function mobile() {
var check = false; //wrapper no check
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|
View 1.php
<?php
session_start();
if(!isset($_SESSION['val'])){
exec("gpio -g mode 18 pwm && gpio pwm-ms && gpio pwmc 192 && gpio pwmr 2000");
}
function inicio(){
exec('gpio -g pwm 18 240');
}
@mlhaufe
mlhaufe / ShellBrowse.vbs
Last active Aug 5, 2019
VBScript File Browser
View ShellBrowse.vbs
Option Explicit
' Flags for the options parameter
Const BIF_returnonlyfsdirs = &H0001
Const BIF_dontgobelowdomain = &H0002
Const BIF_statustext = &H0004
Const BIF_returnfsancestors = &H0008
Const BIF_editbox = &H0010
Const BIF_validate = &H0020
Const BIF_browseforcomputer = &H1000
@Silva97
Silva97 / lscanf.c
Last active Nov 15, 2019
Maneira segura de pegar o input do usuário
View lscanf.c
/********************
* Developed by Luiz Felipe.
*
* GitHub: https://github.com/Silva97
* Facebook: https://www.facebook.com/B4.0E.B0.48.CD.10.B0.69.CD.10.C3
********************/
#include <stdio.h>
#include <stdarg.h>
#include <limits.h>
@MarcoWorms
MarcoWorms / autotinder.js
Last active Apr 26, 2020
Tinder Dislike Signos Persons
View autotinder.js
const Latinise={};Latinise.latin_map={"Á":"A","Ă":"A","Ắ":"A","Ặ":"A","Ằ":"A","Ẳ":"A","Ẵ":"A","Ǎ":"A","Â":"A","Ấ":"A","Ậ":"A","Ầ":"A","Ẩ":"A","Ẫ":"A","Ä":"A","Ǟ":"A","Ȧ":"A","Ǡ":"A","Ạ":"A","Ȁ":"A","À":"A","Ả":"A","Ȃ":"A","Ā":"A","Ą":"A","Å":"A","Ǻ":"A","Ḁ":"A","Ⱥ":"A","Ã":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ḃ":"B","Ḅ":"B","Ɓ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ć":"C","Č":"C","Ç":"C","Ḉ":"C","Ĉ":"C","Ċ":"C","Ƈ":"C","Ȼ":"C","Ď":"D","Ḑ":"D","Ḓ":"D","Ḋ":"D","Ḍ":"D","Ɗ":"D","Ḏ":"D","Dz":"D","Dž":"D","Đ":"D","Ƌ":"D","DZ":"DZ","DŽ":"DZ","É":"E","Ĕ":"E","Ě":"E","Ȩ":"E","Ḝ":"E","Ê":"E","Ế":"E","Ệ":"E","Ề":"E","Ể":"E","Ễ":"E","Ḙ":"E","Ë":"E","Ė":"E","Ẹ":"E","Ȅ":"E","È":"E","Ẻ":"E","Ȇ":"E","Ē":"E","Ḗ":"E","Ḕ":"E","Ę":"E","Ɇ":"E","Ẽ":"E","Ḛ":"E","Ꝫ":"ET","Ḟ":"F","Ƒ":"F","Ǵ":"G","Ğ":"G","Ǧ":"G","Ģ":"G","Ĝ":"G","Ġ":"G","Ɠ":"G","Ḡ":"G","Ǥ":"G","Ḫ":"H","Ȟ":"H","Ḩ":"H","Ĥ":"H","Ⱨ":"H","Ḧ":"H","Ḣ":"H","Ḥ":"H","Ħ":"H","Í":"I","Ĭ":"I","Ǐ":"I","Î":"I","Ï":"I","Ḯ":"I","İ":"I","Ị":"I","Ȉ":"I