Skip to content

Instantly share code, notes, and snippets.

View sergiocampama's full-sized avatar
🇨🇱

Sergio Campamá sergiocampama

🇨🇱
View GitHub Profile
This file has been truncated, but you can view the full file.
I0313 19:13:33.623240000 6164049920 chttp2_transport.cc:777] W:0x1128a5000 CLIENT [ipv6:%5B2800:3f0:4003:c08::5f%5D:443] state IDLE -> WRITING [TRANSPORT_FLOW_CONTROL]
I0313 19:13:33.623335000 6164049920 chttp2_transport.cc:777] W:0x1128a5000 CLIENT [ipv6:%5B2800:3f0:4003:c08::5f%5D:443] state WRITING -> WRITING+MORE [INITIAL_WRITE]
I0313 19:13:33.623497000 6164049920 chttp2_transport.cc:777] W:0x1128a5000 CLIENT [ipv6:%5B2800:3f0:4003:c08::5f%5D:443] state WRITING+MORE -> WRITING [begin write in current thread]
I0313 19:13:33.623677000 6164049920 chttp2_transport.cc:777] W:0x1128a5000 CLIENT [ipv6:%5B2800:3f0:4003:c08::5f%5D:443] state WRITING -> IDLE [finish writing]
I0313 19:13:33.628311000 6164049920 frame_settings.cc:232] CHTTP2:CLI:ipv6:%5B2800:3f0:4003:c08::5f%5D:443: got setting MAX_CONCURRENT_STREAMS = 100
I0313 19:13:33.628365000 6164049920 frame_settings.cc:225] 0x1128a5000[cli] adding 983041 for initial_window change
I0313 19:13:33.62
#!/bin/bash -eu
if [[ $# -ne 2 ]]; then
echo "usage: mac-release semversion channel"
exit 1
fi
TOOLS_DIR="$(dirname $(realpath $0))"
PROJECT_DIR="$(dirname $TOOLS_DIR)"
@functions_framework.http
def main(request):
if "X-Hub-Signature-256" not in request.headers:
return "nok", 401
signature = hmac.new(
WHATSAPP_API_APP_SECRET.encode("utf-8"),
msg=request.get_data(as_text=True).encode("utf-8"),
digestmod=hashlib.sha256
).hexdigest()
#!/usr/bin/env bash
function confirm {
if [[ $FORCE == 1 ]]; then
return 0
fi
local ok
read -r ok
<html>
<body>
<script type="module">
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.9.1/firebase-app.js";
import { OAuthProvider, getAuth, signInWithRedirect, getRedirectResult } from 'https://www.gstatic.com/firebasejs/9.9.1/firebase-auth.js'
import { getFunctions, httpsCallable } from 'https://www.gstatic.com/firebasejs/9.9.1/firebase-functions.js'
const params = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams, prop) => searchParams.get(prop),
});
@sergiocampama
sergiocampama / Output
Last active July 19, 2018 03:48
Error with static linking
Hello, world!
*** Error in `./Hello': free(): invalid pointer: 0x00007ff6db7ca760 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff6d99637e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ff6d996c37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ff6d997053c]
/usr/lib/x86_64-linux-gnu/libp11-kit.so.0(+0x3fd6d)[0x7ff6d48fad6d]
/lib64/ld-linux-x86-64.so.2(+0x10de7)[0x7ff6db5d2de7]
/lib/x86_64-linux-gnu/libc.so.6(+0x39ff8)[0x7ff6d9925ff8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7ff6d9926045]
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system 'bundle install'
end
@sergiocampama
sergiocampama / README.md
Last active June 24, 2022 18:04
Google Spreadsheet Cryptoscrypt

Google Spreadsheet Cryptoscrypt

Google Spreadsheet scripts for Coinbase and USD/BTC and USD/other currencies.

If you found this useful, donate XMR!: 44WvZj9zRXqgq3jHpemt8dLt29aDRQqdiK6ivxoCf3e65cdXbzBnHJyc2CdGWeGr36f5MBkqQBb61hus34nUVae4ND2PKx4

Made with love from Chile

@sergiocampama
sergiocampama / rut.rb
Created June 21, 2013 14:27
Ruby class extensions for Chilean RUTs
class Fixnum
def to_rut
digits = self.to_s.to_rut
end
end
class String
def to_rut
count = -1
sum = self.each_char.to_a.map(&:to_i).reverse.
@sergiocampama
sergiocampama / install.sh
Created November 7, 2012 19:33
Postgresql 9.2.1 Installation instructions for Ubuntu 12.04
#Postgresql 9.2.1 Compilation instructions for Ubuntu 12.04
#This will install Postgresql 9.2.1 into /usr/local/postgresql-9.2.1
#This assumes that you have sudo provileges on the machine installing postgresql
#It should work by copying and pasting into the shell, I haven't tested it, I just summarized
#what I just did and it worked
#Get requirements
sudo apt-get install build-essential libreadline6-dev zlib1g-dev