Skip to content

Instantly share code, notes, and snippets.

@gvJaime
gvJaime / liquid.sh
Last active July 6, 2018 17:12
Script for making content aware scale gifs
mkdir tmp
for i in `seq 1 100`;
do
let "owo=100-$i"
echo $owo
/usr/local/bin/convert -liquid-rescale $owo% original.png ./tmp/$i.png
/usr/local/bin/convert -scale 300x300 ./tmp/$i.png ./tmp/$i.png
done
/usr/local/bin/convert -delay 1 -loop 0 ./tmp/{1..100}.png liquid.gif
rm -rf ./tmp
" Avoid issues with using zsh
set shell=/bin/bash
" Required
set nocompatible
" Plugins start
call plug#begin('~/.vim/plugged')
" Status
@miguelmota
miguelmota / struct_custom_unmarshal.go
Created March 15, 2018 04:12
Golang custom struct unmarshal function example
package main
import (
"encoding/json"
"fmt"
"log"
"time"
)
type MyStruct struct {
font_family SF Mono
font_size 15.0
adjust_column_width -1
term xterm-256color
tab_bar_edge top
copy_on_select yes
map alt+left send_text all \x1b\x62
map alt+right send_text all \x1b\x66
@olivere
olivere / elastic_v6_getting_started.go
Created March 1, 2018 07:27
Getting started with Elastic v6
package main
import (
"context"
"encoding/json"
"fmt"
"reflect"
"github.com/olivere/elastic"
)
@leetrout
leetrout / emoji_leaders.js
Last active May 6, 2020 14:31
Slack Custom Emoji Leaderboard
// Run on https://<yourteam>.slack.com/customize/emoji
var out = "CUSTOM EMOJI LEADERS\n";
var usersCount = {};
$('#custom_emoji .author_cell').each((i, el) => {
let user = el.textContent.trim();
let u = usersCount[user] ? usersCount[user] : {user: user, count: 0};
u.count += 1
usersCount[user] = u;
});
@shortjared
shortjared / list.txt
Last active May 6, 2024 17:16
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@marcusramberg
marcusramberg / -
Last active April 9, 2024 09:45
kitty.conf including nord color theme
# vim:fileencoding=utf-8:ft=conf
# Fully featured
font_family FuraCode Nerd Font Mono
italic_font auto
bold_font auto
bold_italic_font auto
# Font size (in pts)
font_size 11.0
@angrychimp
angrychimp / s3_threaded_delete.py
Created November 7, 2017 18:07
Python3/boto3 multi-threaded S3 object delete
import boto3
import sys
import json
import logging
from threading import Thread
from queue import Queue
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
@Integralist
Integralist / 1. basic list objects call.go
Last active May 2, 2020 23:49
[Golang AWS S3 Examples] #go #golang #aws #s3
sessionToken := "" // not required
accessKey := "AWS_ACCESS_KEY_ID"
secretKey := "AWS_SECRET_ACCESS_KEY"
sess, err := session.NewSession(&aws.Config{
Region: aws.String("us-east-1"),
Credentials: credentials.NewStaticCredentials(accessKey, secretKey, sessionToken),
})
if err != nil {
log.Fatal("unable to create aws session")