Skip to content

Instantly share code, notes, and snippets.

View jmorenoamor's full-sized avatar
🚀
Software craftsman, Master of nothing. I love space stuff.

Jesús Moreno Amor jmorenoamor

🚀
Software craftsman, Master of nothing. I love space stuff.
View GitHub Profile
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active June 25, 2024 14:53
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@danielchow
danielchow / spinner.txt
Created July 26, 2017 08:44 — forked from azlux/spinner.txt
spinner list for program
dots = ("⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏")
dots2 = ("⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷")
dots3 = ("⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓")
dots4 = ("⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆")
dots5 = ("⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋")
dots6 = ("⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁")
dots7 = ("⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈")
dots8 = "⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈")
dots9 = ("⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏")
dots10 = ("⢄","⢂","⢁","⡁","⡈","⡐","⡠")
@firatkucuk
firatkucuk / delete-slack-messages.js
Last active June 18, 2024 23:06
Deletes slack public/private channel messages, private chat messages and channel thread replies.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = 'SLACK TOKEN';
// Legacy tokens are no more supported.
// Please create an app or use an existing Slack App
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erikbern
erikbern / use_pfx_with_requests.py
Last active June 5, 2024 12:18
How to use a .pfx file with Python requests – also works with .p12 files
import contextlib
import OpenSSL.crypto
import os
import requests
import ssl
import tempfile
@contextlib.contextmanager
def pfx_to_pem(pfx_path, pfx_password):
''' Decrypts the .pfx file to be used with requests. '''
@djungelorm
djungelorm / autopilot.py
Created February 16, 2016 02:48
kRPC AutoPilot
import krpc
import time
import numpy
import math
def main():
conn = krpc.connect()
vessel = conn.space_center.active_vessel
# Point prograde, 0 degree roll
@fat-lobyte
fat-lobyte / ksrpc_logger.py
Last active August 30, 2019 14:36
A small logging script for Kerbal Space Program that uses the kRPC mod
#!/usr/bin/env python3
# (C) Alexander Korsunsky, 2016
import krpc
import time
import sys
import numpy as np
import argparse
@etes
etes / pi_mount_usb.md
Last active June 15, 2024 13:39
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

@toast38coza
toast38coza / call_soap_with_requests.py
Created October 22, 2014 11:17
Call a SOAP Service with plain old requests
import requests
url="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://ws.cdyne.com/WeatherWS/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns1:Body><ns0:GetWeatherInformation/></ns1:Body>
</SOAP-ENV:Envelope>"""
@kracekumar
kracekumar / Writing better python code.md
Last active February 19, 2024 03:06
Talk I gave at June bangpypers meetup.

Writing better python code


Swapping variables

Bad code