Skip to content

Instantly share code, notes, and snippets.

View kafran's full-sized avatar
🏠
WFH

Kolmar Kafran kafran

🏠
WFH
View GitHub Profile
@lucashmsilva
lucashmsilva / TESOURODIRETO(taxa).js
Last active August 30, 2024 15:22
API para criar a função TESOURODIRETO Google Sheets
/*
* @return Retorna a cotação atual de um título específico do Tesouro Direto Junto com a taxa anual de retorno
* @customfunction
**/
function TESOURODIRETO(bondName) {
let srcURL = "https://www.tesourodireto.com.br/json/br/com/b3/tesourodireto/service/api/treasurybondsinfo.json";
let jsonData = UrlFetchApp.fetch(srcURL);
let parsedData = JSON.parse(jsonData.getContentText()).response;
for(let bond of parsedData.TrsrBdTradgList) {
@JPvRiel
JPvRiel / apt_pinning_priorities.md
Last active July 5, 2024 17:46
Apt package pinning and priorities
@xenialaq
xenialaq / essential_packages.sh
Last active November 12, 2017 01:11
Ubuntu Setup (Ubuntu MATE 17.10)
#!/bin/bash
sudo apt-get install -y \
build-essential git curl nano gedit vim kdiff3 ubuntu-make octave \
chromium-browser fcitx cloc gtkhash p7zip gparted baobab gimp pinta uncrustify \
imagemagick meshlab python-nose \
muon okular python3-pyqt4 pavucontrol pulseaudio-equalizer \
redshift redshift-gtk \
openjdk-8-jdk nginx \
xdotool tidy python-gpgme autoconf libqt5opengl5 \
@palmerc
palmerc / imageRoundtrip.swift
Last active April 15, 2024 03:35
Roundtrip a UIImage to its raw pixel values and back to an image again
import UIKit
import CoreGraphics
func imageFromPixelValues(pixelValues: [UInt8]?, width: Int, height: Int) -> CGImage?
{
var imageRef: CGImage?
if pixelValues != nil {
let imageDataPointer = UnsafeMutablePointer<UInt8>(pixelValues!)
let colorSpaceRef = CGColorSpaceCreateDeviceGray()
@aculich
aculich / remove-empty-columns.csv
Last active May 16, 2024 06:18
remove-empty-columns
foo bar baz
a 1
b 2
c
4
e 5
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 28, 2024 04:20
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mtigas
mtigas / gist:952344
Last active December 11, 2024 19:44
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: