Skip to content

Instantly share code, notes, and snippets.

View dannluciano's full-sized avatar
🏠
Working from home

Dann Luciano dannluciano

🏠
Working from home
View GitHub Profile
@steven2358
steven2358 / ffmpeg.md
Last active April 10, 2025 15:05
FFmpeg cheat sheet
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active March 25, 2025 08:05
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@PaulKinlan
PaulKinlan / getdeviceart.sh
Last active May 26, 2022 11:20
Screen Record for Android
#! /bin/bash
mkdir -p ./backgrounds
function get_google_device_art {
local device=$1
# Get the Google Device backgrounds
curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_back.png" > "./backgrounds/$1_port_back.png"
curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_fore.png" > "./backgrounds/$1_port_fore.png"
var scrollPosition = sessionStorage.getItem("scrollPosition")
if(scrollPosition) window.scrollTo(0, scrollPosition)
document.addEventListener("scroll", function() {
sessionStorage.setItem("scrollPosition", window.pageYOffset | document.body.scrollTop)
})
import java.util.HashSet;
import java.util.Set;
import java.util.stream.IntStream;
public class HappyNumber {
public static void main(String[] args) {
IntStream.range(0, args.length == 0 ? 1001 : Integer.parseInt(args[0]))
.parallel()
.filter((number) -> {
@antirez
antirez / xmas.c
Created December 24, 2014 18:48
Happy xmas!
#include <stdio.h>
#include <stdlib.h>
int
main()
{int h=9,
d=0,x;while
(h--){for(x=0;
x<39;x++){int a=x
-6;if(a<0)a=-a;printf
@pnc
pnc / observer.md
Last active April 1, 2025 21:38
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
@infoslack
infoslack / Dockerfile
Created October 8, 2014 05:26
Demo Docker on Rails
FROM ubuntu:trusty
# Update the repository
RUN apt-get update
# Install necessary tools
RUN apt-get install -y wget net-tools build-essential git
# Setup Install Nginx
RUN wget -q -O - http://nginx.org/keys/nginx_signing.key | apt-key add -
// See: https://devforums.apple.com/message/1000934#1000934
import Foundation
// Logic
operator prefix ¬ {}
@prefix func ¬ (value: Bool) -> Bool {
return !value
}

Brazilian TLD Applicants

TLD Company
.ITAU Itau Unibanco Holding S.A.
.BRADESCO Banco Bradesco S.A.
.IPIRANGA Ipiranga Produtos de Petroleo S.A.
.BOM Núcleo de Informação e Coordenação do Ponto BR - NIC.br
.FINAL Núcleo de Informação e Coordenação do Ponto BR - NIC.br
.RIO Empresa Municipal de Informática SA - IPLANRIO