Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Flávio H. Ferreira fhferreira

🏠
Working from home
Block or report user

Report or block fhferreira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fhferreira
fhferreira / README.md
Created Feb 7, 2020 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
View README.md
View whatsapp.js
setTimeout(function() {
function getAllModules() {
return new Promise((resolve) => {
const id = _.uniqueId("fakeModule_");
window["webpackJsonp"](
[],
{
[id]: function(module, exports, __webpack_require__) {
resolve(__webpack_require__.c);
}
View whatsapp2.js
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]
View slugify.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 Nov 29, 2019
Command to delete all folders .DS_Store
View delete-ds-store.sh
find /usr/local/share/Library/Caches/Yarn/ -name .DS_Store -exec rm -R "{}" \;
@fhferreira
fhferreira / .env
Created Nov 27, 2019
Telescope Laravel
View .env
APP_ENV=local // changed from production to see if that worked
TELESCOPE_ENABLED=true
View API WHATSAPP
-> 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 Nov 6, 2019 — forked from beatfactor/install_nginx_macos_source.md
Install Nginx on Mac OS from source (without brew)
View install_nginx_macos_source.md

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 Oct 30, 2019 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
View docker_kill.sh
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
View pwa-studio-setup-magento-230-alpha.txt
################################################################
# NODE: 8.11.2
# NPM: 5.6.0 (I prob should upgrade this one)
# MySQL: 5.7
# PHP: 7.1
################################################################
################################################################
################################
### DOWNLOAD AND PREPARE MAGENTO TO INSTALL
# assuming you are in /<YOUR_PROJECT_FOLDER>/
You can’t perform that action at this time.