Skip to content

Instantly share code, notes, and snippets.

View nathmisaki's full-sized avatar

Nathalia Misaki nathmisaki

View GitHub Profile
@nathmisaki
nathmisaki / gist:3e8534faa559adad1e40d4f768f08a7a
Last active November 17, 2021 16:55
Exemplo Carteira Digital
{
"balance":{
"transferable_balance":93.34,
"witheld_balance":null,
"total_balance":373.36
},
"next_release":{
"client":"Helenita Emmanuela Nascimento Cabral",
"reference":"Mensalidade de Nov/21",
"amount":46.67,
1 https://storage.googleapis.com/hdt-1/PKVeiJyUEvPdmauNhnXu4BYP?GoogleAccessId=hdt-1-646%40horadotreino.iam.gserviceaccount.com&Expires=1635737822&Signature=V7zMRnSC8D0xGKq%2BV9qdA4wEiYbCeysvKA8Lj7AhaudWbk2aAm8hnH%2B3o7KHSVVSFe%2BxNsmbHqfftFRtF5yoVL%2FXxe1GDAeUQtpNoc2xFQ7RpBNPkeV4ju9aDcIgNihvV4xgG7vssIktjZwjXItQUhcC4DfdnVTejxFQknybnhXzEHir2pcFMWehX5OpDqV3EcrW0X4IMeK7Yd6NlQa%2BjzuQRtYg4p2siC2n1gzoyMcdP6yXnlxVQ5BAtvGofWQWFgIT9vB7jiK2x9pdg%2BWRLylKAYBsnXxQN3aPqLToq%2Bwp%2FxRHMD2qIxaXXkuVsuy86%2Fcm9y8UgpH7NzfGEDK%2FFA%3D%3D&response-content-disposition=inline%3B+filename%3D%22levantamento-terra.gif%22%3B+filename%2A%3DUTF-8%27%27levantamento-terra.gif&response-content-type=image%2Fgif
4 https://storage.googleapis.com/hdt-1/dicAR6SHbN9ah7RrXBw1fVKu?GoogleAccessId=hdt-1-646%40horadotreino.iam.gserviceaccount.com&Expires=1635737822&Signature=XB26Cn%2BfcMWYBZWPupjqty%2FfANA2KCDRIwzdPuvpiDiZaDqfRqdipwcEm4%2B9gxS%2FO24eJZPXtHW1m03qiJPpuAtnnKZqyRLSZFEPfB2aolLY%2B7GIh6PkMx8EYO4ZUrMcTKF3lNTx0vnGck7J1XL%2BtSQxy%2BEEjpTlZy
@nathmisaki
nathmisaki / block_personal_appts
Created January 10, 2020 01:30 — forked from ttrahan/block_personal_appts
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Instructions on how to set up can be found at https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
function sync() {
var id="XXXXXXXXXX"; // CHANGE - id of the secondary calendar to pull events from
var today=new Date();
var enddate=new Date();
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time
var secondaryCal=CalendarApp.getCalendarById(id);
var secondaryEvents=secondaryCal.getEvents(today,enddate);
@nathmisaki
nathmisaki / resque_tips.rb
Last active December 30, 2016 19:01 — forked from clemens/resque_retry.rb
Resque 1.x Swiss Army Tool
# inspired by http://ariejan.net/2010/08/23/resque-how-to-requeue-failed-jobs
# retry all failed Resque jobs except the ones that have already been retried
# This is, for instance, useful if you have already retried some jobs via the web interface.
Resque::Failure.each { |i, j| Resque::Failure.requeue(i) unless j['retried_at'].present? }; nil
# retry all :)
Resque::Failure.each { |i, j| Resque::Failure.requeue(i) }; nil
# Clear retried jobs
{
kind: "message",
id: 12201,
body: "Boleto.pdf",
created_at: "2015-05-18T19:15:08.000-03:00",
is_read: true,
sender: {
image_url: "https://doghero-assets.s3.amazonaws.com/assets/avatar-placeholder-100-7f7d5fce89be7e57cfa76fa9fc01411c.png",
id: 1,
name: "Nelson"
require 'benchmark'
require 'logger'
log = Logger.new(STDOUT)
log.level = Logger::DEBUG
n = ARGV[0].to_i
Benchmark.bm do |b|
b.report "info level" do
log.level = Logger::INFO
n.times { a=1+1; log.debug(a) }
end
#!/bin/bash
## START PRECOMMIT HOOK
files_modified=`git status --porcelain | egrep "^(A |M |R ).*" | awk ' { if ($3 == "->") print $4; else print $2 } '`
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"
## use ruby defined in project
source .rvmrc
for f in $files_modified; do
#!/bin/bash
## START PRECOMMIT HOOK
files_modified=`git status --porcelain | egrep "^(A |M |R ).*" | awk ' { if ($3 == "->") print $4; else print $2 } '`
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"
## use ruby defined in project
[ -s ".rvmrc" ] && source .rvmrc
if [ -s ".ruby-version" ]; then
_rvmrc="$(cat .ruby-version)"
@nathmisaki
nathmisaki / my.cnf
Created September 13, 2011 20:59
my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
Vim #ftw but manage vim plugins is not a task that I like.
Let's change that:
A Fake bash commands:
$ vim-apt list
$ vim-apt update # Update and see new versions of that package (like apt-get update)