Skip to content

Instantly share code, notes, and snippets.

@vardrop
vardrop / irc.py
Created October 29, 2018 21:21 — forked from primaryobjects/irc.py
A simple IRC client written in Python.
#
# [2016-03-14] Challenge #258 [Easy] IRC: Making a Connection
# https://www.reddit.com/r/dailyprogrammer/comments/4ad23z/20160314_challenge_258_easy_irc_making_a/
#
import socket
input = """chat.freenode.net:6667
dude1267
@heppu
heppu / ARCH_INSTALL.MD
Last active February 27, 2022 17:01
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@shpaker
shpaker / habr-radiot-bot.yml
Last active November 28, 2022 16:16
configuration for feedforbot
cache:
type: 'files'
schedulers:
- listener:
type: 'rss'
params:
url: 'https://habr.com/ru/rss/all/all/?fl=ru'
transport:
type: 'telegram_bot'
params:

Rust Optimization Tips (or, Why Rust Is Faster Than Python)

If you're looking to write fast code in Rust, good news! Rust makes it really easy to write really fast code. The focus on zero-cost abstractions, the lack of implicit boxing and the lifetime system that means memory is managed statically means that even naïve code is often faster than the equivalent in most other languages out there, and certainly faster than naïve code in any equivalently-safe language. Maybe, though, like most programmers you've spent your whole programming career safely insulated from having to think about any of this, and now you want to dig a little deeper and find out the real reason that

@jiananlu
jiananlu / gist:9258032
Last active May 11, 2023 00:14
upgrade openwrt kernel and reinstall all packages manual

upgrade the system

Make sure you can ssh to the router by root and type in the command:

cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-mw4530r-v1-squashfs-sysupgrade.bin
sysupgrade -v openwrt-ar71xx-generic-mw4530r-v1-squashfs-sysupgrade.bin
@dmix
dmix / aliases.ev
Last active September 24, 2023 15:08
elvish aliases
# ==============================================================================
# Elvish Aliases
# ==============================================================================
# Aliases
# -----------------------------------------------------------------------------
# Git
git-aliases = [
&prefix= "g"
@junegunn
junegunn / notes.sh
Last active October 23, 2023 01:27
Managing notes with fzf
#!/usr/bin/env bash
#
# Managing notes with fzf (https://github.com/junegunn/fzf)
# - CTRL-L: List note files in descending order by their modified time
# - CTRL-F: Search file contents
#
# Configuration:
# - $NOTE_DIR: Directory where note files are located
# - $NOTE_EXT: Note file extension (default: txt)
@0x9090
0x9090 / torrc.examples.txt
Created February 8, 2016 06:47
torrc examples
This file is part of Whonix
Copyright (C) 2012 - 2014 Patrick Schleizer <adrelanos@riseup.net>
See the file COPYING for copying conditions.
**** Do NOT edit this file! ****
This file will show you examples you can copy and paste to /etc/tor/torrc
Additionally, you can read the official Tor Manual at:
https://www.torproject.org/docs/tor-manual.html.en
@idolpx
idolpx / webp2gif
Last active December 16, 2023 07:36
Converts a .WEBP file to animated .GIF
#!/bin/bash
DELAY=${DELAY:-10}
LOOP=${LOOP:-0}
r=`realpath $1`
d=`dirname $r`
pushd $d > /dev/null
f=`basename $r`
n=`webpinfo -summary $f | grep frames | sed -e 's/.* \([0-9]*\)$/\1/'`
dur=`webpinfo -summary $f | grep Duration | head -1 | sed -e 's/.* \([0-9]*\)$/\1/'`
@cortesben
cortesben / hg-commands.md
Last active January 9, 2024 14:53
Mercurial command cheat sheet

Mercurial Commands

Commands Description
hg pull get latest changes like git pull use flags like -u IDK why yet
hg add only for new files
hg commit add changes to commit with -m for message just like git
hg addremove adds new files and removes file not in your file system
hg incoming see changes commited by others
hg outgoing see local commits