Skip to content

Instantly share code, notes, and snippets.

View Falci's full-sized avatar
🍉

Fernando Falci Falci

🍉
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>404 Not found</title>
<style>
body {
background: #272b30;
}
text {
@Falci
Falci / background.js
Created February 8, 2018 14:33 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
// If you can read this code, you could
// probably use a free cup of coffee.
var your_drink;
var reverse = function(s) {
return s.split("").reverse().join("");
}
var barista = {
const code = document.getElementsByTagName('pre')[0].innerHTML.trim();
let sum = 0;
for(let i=1; i<code.length;i++) {
const current = code[i],
prev = code[i-1];
if(current === prev) { sum += parseInt(current, 10) }
}
package me.falci;
import io.reactivex.Observable;
/**
* @author Falci
*
*/
public class PessoaModem {
# curl https://goo.gl/5BWeGl -L -o /etc/update-motd.d/000-falci
``....`
`-:/+oooo++//:-`
`:+osssyhdmNmho/.`
./ossssydNMNh+-`
-+sssssdNMNy/` `.-:///::-.`
:ossssymMMh/` .:+shhysssso+/-`
.ossssymMNy- `.:osyyssssso+:`
@Falci
Falci / AWS Swarm cluster.md
Created March 18, 2017 20:25 — forked from ghoranyi/AWS Swarm cluster.md
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

@Falci
Falci / title.service.ts
Created March 1, 2017 03:16
Angular2 Title utility
import {Title} from "@angular/platform-browser";
import {Injectable} from "@angular/core";
@Injectable()
export class TitleService extends Title {
private prefix: string = '';
private suffix: string = '';
setTitle(newTitle: string) {
{
"extends": "eslint:recommended",
"plugins": ["angular"], // npm i -D eslint-plugin-angular
"env": {
"browser": true,
"jasmine": true
},
"globals": {
"angular": true,
"module": true,
// Useless box
// Fernando Falci <falci at falci dot me>
#include <Servo.h>
Servo servo;
const int PIN_SERVO = 8;
const int PIN_BTN = 7;
const int POS_FECHADO = 100;