Skip to content

Instantly share code, notes, and snippets.

View fhferreira's full-sized avatar
🏠
Home-Office since 2005

Flávio H. Ferreira fhferreira

🏠
Home-Office since 2005
View GitHub Profile
@fhferreira
fhferreira / pdf-invoice.html
Created May 7, 2020 23:50 — forked from channaveer/pdf-invoice.html
Invoice Sample HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Some Random Title</title>
<style>
body{
@fhferreira
fhferreira / README.md
Created February 7, 2020 21:00 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
setTimeout(function() {
function getAllModules() {
return new Promise((resolve) => {
const id = _.uniqueId("fakeModule_");
window["webpackJsonp"](
[],
{
[id]: function(module, exports, __webpack_require__) {
resolve(__webpack_require__.c);
}
setTimeout(function () {
function getAllModules() {
return new Promise((resolve) => {
const id = _.uniqueId("fakeModule_");
window["webpackJsonp"](
[], {
[id]: function (module, exports, __webpack_require__) {
resolve(__webpack_require__.c);
}
}, [id]
@fhferreira
fhferreira / slugify.php
Created January 11, 2020 17:31
Slug php
<?php
function slugify($text)
{
// replace non letter or digits by -
$text = preg_replace('~[^\pL\d]+~u', '-', $text);
// transliterate
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
@fhferreira
fhferreira / delete-ds-store.sh
Created November 29, 2019 21:46
Command to delete all folders .DS_Store
find /usr/local/share/Library/Caches/Yarn/ -name .DS_Store -exec rm -R "{}" \;
@fhferreira
fhferreira / .env
Created November 27, 2019 05:27
Telescope Laravel
APP_ENV=local // changed from production to see if that worked
TELESCOPE_ENABLED=true
-> GRID - onRecord
--------------------------------------------------------------------
{wpp} = "<img class='cm_wpp' data-phone='".{telefone}."' data-nome='".{nome}."' data-id='".{id}."' src='/scriptcase9/app/BootstrapTour/_lib/img/grp__NM__ico__NM__if_WhatsApp_1298775.png' border='0'>";
--------------------------------------------------------------------
-> GRID - onScriptInit
@fhferreira
fhferreira / install_nginx_macos_source.md
Created November 6, 2019 04:40 — forked from beatfactor/install_nginx_macos_source.md
Install Nginx on Mac OS from source (without brew)

Install Nginx on Mac OS from source

no Homebrew required

1. Download Nginx

$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
@fhferreira
fhferreira / docker_kill.sh
Created October 30, 2019 12:40 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt