Skip to content

Instantly share code, notes, and snippets.

View patoroco's full-sized avatar
:octocat:
why do we need status in Github?

Jorge Maroto patoroco

:octocat:
why do we need status in Github?
View GitHub Profile
@patoroco
patoroco / jupyter_with_pipenv.md
Last active November 1, 2022 10:32
Setup to get jupyter running in local using a virtualenv (created with pipenv)

Setup for running the following steps

export PROJECT_NAME=the_name_of_the_project
export PY_VERSION=3.10.5

mkdir $PROJECT_NAME
cd $PROJECT_NAME

Creating the virtualenv

function main() {
deleteOldMessages('notifications-jenkins');
deleteOldMessages('notifications-sentry');
}
function deleteOldMessages(label_to_delete) {
var search = 'label:' + label_to_delete + ' -{label:Trash} older_than:6m';
var threads = GmailApp.search(search, 0, 120);
{
"url": "https://r2---sn-8vq54voxn25po-h5q6.googlevideo.com/videoplayback?mn=sn-8vq54voxn25po-h5q6%2Csn-h5q7rn7k&ip=77.225.33.112&mm=31%2C29&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&mv=m&pl=24&mt=1554322750&requiressl=yes&ms=au%2Crdu&mime=video%2Fmp4&dur=1200.076&id=o-AEHGYR9UPja6KenJOgXvv3jdSUgzo_22ImxCazEAHRHx&ipbits=0&gir=yes&lmt=1547757050318422&source=youtube&ratebypass=yes&c=WEB&fvip=2&clen=104971893&itag=18&initcwndbps=903750&txp=5531432&expire=1554344454&ei=phWlXPfcFIO11gaSmIHwCQ&key=yt6&signature=BC13E1BE90164A0409D14D310BC4878981C1413B.42E99C488BA4B82E292CFF34E7A7BFD891289039"
}
@patoroco
patoroco / wistia.json
Last active February 14, 2018 16:34
results from youtube-dl
// From RELM.io - https://academy.realm.io/posts/tryswift-jorge-ortiz-architectural-superpowers-swift-ios/
// https://realm.wistia.com/medias/7ycpx3u7tx
{
"id": "7ycpx3u7tx",
"title": "20 Jorge Ortiz",
"description": "a Conference Videos video",
"formats": [
{
"format_id": "hls_video-0",
"url": "http://embed.wistia.com/deliveries/dab5729e4902e53e40bbeba6a3f68754cfd5d928.bin",
@patoroco
patoroco / Jekyll-Dockerfile
Last active May 21, 2017 18:59
Docker to use Jekyll static page generator
FROM ruby:2.4.1-alpine
# https://github.com/ffi/ffi/issues/485#issuecomment-209778567
RUN apk add --update build-base libffi-dev git openssh
ARG SRC_GEMFILE=Gemfile
ARG BUNDLE_GEMFILE=/src/ruby/Gemfile
# Install current gems with bundler
COPY $SRC_GEMFILE $BUNDLE_GEMFILE
@patoroco
patoroco / postgres-cheatsheet.md
Created April 24, 2017 10:15 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

@patoroco
patoroco / device.txt
Last active March 16, 2016 11:23
Bug with NSDateComponents (execute this method in simulator and in physical device to see different results)
😡 2000 --> 1999-01
😏 2001 --> 2001-01
😏 2002 --> 2002-01
😏 2003 --> 2003-01
😏 2004 --> 2004-01
😡 2005 --> 2004-01
😡 2006 --> 2005-01
😏 2007 --> 2007-01
😏 2008 --> 2008-01
😏 2009 --> 2009-01
@patoroco
patoroco / bad_images.rb
Last active December 27, 2015 19:14
Script to compare retina and non-retina images to test if there are correctly sized
#!/usr/bin/env ruby
require 'fastimage'
if ARGV.count != 1
puts "Use command: \n$ ruby #{__FILE__} <.xcassets>"
exit()
end
@patoroco
patoroco / my_ip.sh
Last active December 27, 2015 13:56
Get my IP (en0 interface)
ifconfig | awk '/en0/{getline; print}' | awk 'NR==2 {print $2}'
@patoroco
patoroco / gist:05943edde1c4ba6a3559
Last active August 29, 2015 14:12
Regexp material (I used for Obj-C)