Skip to content

Instantly share code, notes, and snippets.

View simonardejr's full-sized avatar

Simonarde Lima simonardejr

View GitHub Profile
@simonardejr
simonardejr / install-php8-cli.sh
Last active December 27, 2020 15:39
simple script to install php8 (cli)
#!/bin/bash
# add repository
sudo add-apt-repository ppa:ondrej/php
# update apt
sudo apt update
# install php8
sudo apt install php8.0-cli php8.0-bcmath php8.0-common php8.0-curl php8.0-gd php8.0-gmp php8.0-intl php8.0-mbstring php8.0-mysql php8.0-opcache php8.0-pgsql php8.0-readline php8.0-redis php8.0-sqlite3 php8.0-xml php8.0-xsl php8.0-zip -y
// Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e
// by @levelsio
// HOW TO
// 1) Make a Google Sheet, we'll pull the first cell e.g. A1
// 2) Publish your Google Sheet, File -> Publish To Web
// 3) Copy the SHEET_ID in the URL, put it in here below:
const endpoint = "https://spreadsheets.google.com/feeds/cells/SHEET_ID/1/public/full?alt=json"
// 4) Install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188
// 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc)
@simonardejr
simonardejr / git-update-fork.sh
Created October 11, 2020 22:50 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream

Here is my live stream setup kit :)

I recommend only streaming to a single service such as Twitch. It is better for community building and easier on the streamer. Additionally, if you become an affiliate you are locked into a platform anyways.

I recommend streaming from a Windows computer as it is the best.

How my setup works is that I have my main Desktop PC that has my streaming software, chat, alerts, music, and such all running on it. I have a second surface book that has HDMI out into the capture card in my Desktop PC. I do this because often when you compile apps it may freeze up your computer and stream :(. I have 2 sets of keyboards and mice and 2 monitors that I work off of. This works for me, but you do you :)

Software:

  • OBS: Your main go to for streaming software. It works on every OS :). If you want something with everything baked in take a look at Streamlabs OBS.
@simonardejr
simonardejr / axios-401-response-interceptor.js
Created February 6, 2020 14:33 — forked from yajra/axios-401-response-interceptor.js
Axios 401 response interceptor.
// Add a 401 response interceptor
window.axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
if (401 === error.response.status) {
swal({
title: "Session Expired",
text: "Your session has expired. Would you like to be redirected to the login page?",
type: "warning",
showCancelButton: true,
@simonardejr
simonardejr / Python3 Virtualenv Setup.md
Created April 22, 2018 10:11 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@simonardejr
simonardejr / comoSerChatoNoWhatsapp.js
Created January 25, 2018 18:46 — forked from callmeloureiro/comoSerChatoNoWhatsapp.js
Como fazer alguém te responder no whatsapp
/*
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o web.whatsapp.com;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;
@simonardejr
simonardejr / happy_git_on_osx.md
Created November 11, 2017 23:12 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@simonardejr
simonardejr / index.php
Created December 29, 2016 20:55
Remake of the famous Raspberry Pi Sysinfo Script
<?php
// modified by PROXIMO https://gist.github.com/PROX1MO
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 May 1983 13:00:00 GMT");
header("Pragma: no-cache");
function NumberWithCommas($in)
{
return number_format($in);
}
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
function human_filesize($bytes, $decimals = 2) {
$sz = 'BKMGTP';
$factor = floor((strlen($bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
}