ngrok http -host-header=rewrite [your-custom-local-domain]:[port]
Exemplo:
ngrok http -host-header=rewrite teste.lvh.me:3000
corrected = [] | |
File.open('original.txt', 'r').each_line do |date| | |
new_date = Time.parse(date, '%Y-%m-%d %H%M%S') | |
if new_date.month == 6 && new_date.year == 2021 | |
corrected << new_date.next_month.beginning_of_month | |
next | |
end | |
# https://github.com/ddollar/forego | |
ASSET_HOST=localhost:3000 | |
APPLICATION_HOST=localhost:3000 | |
BCRYPT_COST=12 | |
PORT=3000 | |
RACK_ENV=development | |
RACK_MINI_PROFILER=0 | |
SECRET_KEY_BASE=development_secret | |
EXECJS_RUNTIME=Node |
// use this on FlashApp website console to reset your password in case you forgot it | |
// as their support absolutely sucks | |
// ps: this is just for entertaining / learning purposes | |
function tryPass(pass) { | |
return fetch("https://api.flashapp.com.br/p/person/graphql", { | |
"headers": { | |
"accept": "application/json, text/plain, */*", | |
"accept-language": "pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7,fr;q=0.6,ru;q=0.5", | |
"authorization": "put your bearer token here", |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"time" | |
"go.mongodb.org/mongo-driver/bson" | |
"go.mongodb.org/mongo-driver/bson/primitive" |
ngrok http -host-header=rewrite [your-custom-local-domain]:[port]
Exemplo:
ngrok http -host-header=rewrite teste.lvh.me:3000
class NilObjectUnderstadingStrategy | |
def self.can_talk_to?(character) | |
true | |
end | |
end | |
class HumanCharacterUnderstandingStrategy | |
def self.can_talk_to?(character) | |
character.is_a? Human | |
end |
FROM ruby:2.5.7 | |
RUN apt-get update && apt-get install -y cron | |
RUN apt-get install -y nano | |
COPY Gemfile* /usr/src/app/ | |
WORKDIR /usr/src/app | |
ENV BUNDLE_PATH /gems |
# * * * * * DISPLAY=:0 /usr/bin/zenity --info --text="stretch" --title="reminder" | |
# * * * * * /bin/echo "cron works" >> /tmp/file | |
# * * * * * /usr/bin/zenity --notification --text="stretch" --title="reminder" --display=:0.0 | |
# this one on top doesn't work unless we do as below | |
DISPLAY=:0.0 | |
# * * * * * eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)"; /usr/bin/notify-send "TEST" "Crons work!" | |
40 * * * * eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)"; /usr/bin/notify-send "REMINDER" "Check posture!" | |
30 10,14,17 * * * eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)"; /usr/bin/notify-send "REMINDER" "Take a break! (stretch, coffee, etc)" |
<?php | |
class Product1 { | |
public function sendToMarketplace(){ | |
if ($this->marketplace == 'Amazon') { | |
//huge code block | |
} elseif ($this->marketplace == 'Via Varejo') { | |
//huge code block | |
} elseif ($this->marketplace == 'Magalu') { |
<?php | |
class Order { | |
public function sendToEcommerce(){ | |
switch($this->status){ | |
case 'created': | |
$params["access_token"] = "### Chave de Acesso ###"; | |
$data["Order"]["status_id"] = $this->status_id; |