Skip to content

Instantly share code, notes, and snippets.

View wallacesilva's full-sized avatar
🌎
Working Remotely

Wallace Silva wallacesilva

🌎
Working Remotely
View GitHub Profile
# Script to get all config vars in a Heroku app and transfer to a new AWS Secrets Manager
# To get Heroku Auth Token:
# $ heroku auth:token
# Usage:
# python to_secrets.py
import boto3
import heroku3
import json
@akitaonrails
akitaonrails / links.md
Created November 6, 2019 01:28
Links de referência pro Episódio 66 do Canal Akitando
@tylercubell
tylercubell / youtube_livestream.py
Created February 14, 2019 16:17
GStreamer Python YouTube Livestream
import os, gi
gi.require_version("Gst", "1.0")
from gi.repository import GObject, Gst
Gst.init(None)
pipeline = Gst.Pipeline()
# Variables.
youtube_stream_key = "your_key_here"
encoder_speed = "ultrafast"
@rg3915
rg3915 / vim_shortcuts.md
Last active May 28, 2020 20:07
Vim commands shortcuts

Vim

Modo de inserção

  • I - insere no começo da linha.
  • A - insere no final da linha.
  • o - abre um nova linha abaixo.
  • O - abre um nova linha acima.

Navegação

@naaando
naaando / primes.vala
Created January 31, 2018 21:55
Vala primes
// Ultimo numero a ser testado
const long BREAKPOINT = 10000;
int main (string[] args) {
for (int number = 0; number <= BREAKPOINT; number++) {
if (prime (number)) {
print (@"[$number]");
}
}
@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@ewenchou
ewenchou / README.md
Last active July 8, 2023 04:36
Run Python script as systemd service
  1. Create a service file like dash_sniffer.service
  2. Put it in /lib/systemd/system/
  3. Reload systemd using command: systemctl daemon-reload
  4. Enable auto start using command: systemctl enable dash_sniffer.service
@leonardo-lemos
leonardo-lemos / correcao_acentuacao_telegram.md
Last active July 12, 2023 13:32
Como resolver o problema de acentuação do cliente Telegram no elementary OS/Ubuntu 16.04

Para resolver o problema de falta de suporte à acentuação no cliente Telegram no elementary OS, edite o arquivo '~/.local/share/applications/telegramdesktop.desktop' e substitua a seguinte linha:

Exec=/home/[seu_usuario]/Telegram/Telegram -- %u

Por:

Exec=env QT_IM_MODULE=xim /home/[seu_usuario]/Telegram/Telegram -- %u

@ericbn
ericbn / .vimrc
Last active March 31, 2024 10:39
Vim Powerline-like status line without the need of any plugin
" Statusline (requires Powerline font)
set statusline=
set statusline+=%(%{&buflisted?bufnr('%'):''}\ \ %)
set statusline+=%< " Truncate line here
set statusline+=%f\ " File path, as typed or relative to current directory
set statusline+=%{&modified?'+\ ':''}
set statusline+=%{&readonly?'\ ':''}
set statusline+=%= " Separation point between left and right aligned items
set statusline+=\ %{&filetype!=#''?&filetype:'none'}
set statusline+=%(\ %{(&bomb\|\|&fileencoding!~#'^$\\\|utf-8'?'\ '.&fileencoding.(&bomb?'-bom':''):'')
@bharadwaj-raju
bharadwaj-raju / panel-alpha.sh
Created August 13, 2016 19:03
changes panel transparency depending on whether any window is maximized or not
#!/usr/bin/env bash
#-- CONFIGURATION
transparent_alpha=0
maximized_alpha=100
interval=0
#--
alpha_prop_list=()
for prop in $(xfconf-query -c xfce4-panel -p /panels -l); do