Skip to content

Instantly share code, notes, and snippets.

View flavioheleno's full-sized avatar
:octocat:

Flávio Heleno flavioheleno

:octocat:
View GitHub Profile
@flavioheleno
flavioheleno / gist:9767787
Last active August 29, 2015 13:57
Sample Hook Handshake/Callback implementation
<?php
/**
* Script Setup
* CLIENT_KEY and API_VERSION can be used for the PHP SDK (https://github.com/veridu/veridu-php).
* CLIENT_SECRET is used for checking Hook's signature
*
* CLIENT_KEY: API Key from https://dashboard.veridu.com
* CLIENT_SECRET: API Secret from https://dashboard.veridu.com
* API_VERSION: one of the available versions at https://veridu.com/wiki/Version
@flavioheleno
flavioheleno / gist:327396fc3a75f8723a4a
Created December 2, 2014 16:41
PHP PThreads and TimeZone
<?php
class ThreadParent {
public function __construct() {
date_default_timezone_set('UTC');
}
public function breed() {
echo 'Starting..', PHP_EOL;
Verifying that +flavioheleno is my blockchain ID. https://onename.com/flavioheleno

Keybase proof

I hereby claim:

  • I am flavioheleno on github.
  • I am flavioheleno (https://keybase.io/flavioheleno) on keybase.
  • I have a public key ASCfA1uCideVuIM_Cei8YOQdskZyiqY1yfLFgSy7lOLmhAo

To claim this, I am signing this object:

@flavioheleno
flavioheleno / raspberry_pi_touch.md
Created June 20, 2018 00:00 — forked from flokli/raspberry_pi_touch.md
Raspberry Pi with LCD display

Raspberry Pi with Touch Display - Installation Instructions

Operating System

  • prepare an SD Card as described on archlinuxarm.org
  • SSH into your system, add your public key (initial root password is "root")
  • disable root password by calling passwd -d root
  • set a useful hostname by calling echo $hostname > /etc/hostname
  • run pacman -Suy to update packages

Hardware support

LCD Module

@flavioheleno
flavioheleno / macos-ramdisk.sh
Created September 23, 2020 15:08
Create a 2GB ramdisk on MacOS
#!/usr/bin/env bash
set eox -pipefail
diskutil partitionDisk $(hdiutil attach -nomount ram://2048000) 1 GPTFormat APFS 'ramdisk' '100%'
@flavioheleno
flavioheleno / 8_0_x_pt_BR.php
Last active November 20, 2020 16:16
PHP 8 release announcement translation to PT-BR
<?php
$_SERVER['BASE_PAGE'] = 'releases/8_0_x.php';
include_once __DIR__ . '/../include/prepend.inc';
if ($LANG !== 'en' && file_exists("8_0_x_$LANG.php")) {
mirror_redirect("/releases/8_0_x_$LANG.php?lang=$LANG");
}
site_header("PHP 8.0.0 Release Announcement", array(
"current" => "php_8_0_x",
@flavioheleno
flavioheleno / cleanup.sh
Created January 26, 2021 13:20
Clear NodeJS and PHP/Composer dependencies folders
#!/bin/bash
set -eo pipefail
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name "vendor" -type d -prune -exec rm -rf '{}' +
#!/bin/bash
set -eo pipefail
# https://github.com/vendasta/setup-new-computer-script
echo "General: Expand save and print panel by default"
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
@flavioheleno
flavioheleno / hdi.md
Created January 14, 2022 15:27
How do I..?

How do I..?

Contents

...

Class

Define a Class