Skip to content

Instantly share code, notes, and snippets.

@larrasket
larrasket / manifesto.feecting
Created February 22, 2026 22:28 — forked from indraai/manifesto.feecting
The Original Telecomix First Manifesto from 2009
# HOW TO BUILD A CLUSTER LIKE TELECOMIX
p:We want to be copied because we believe that there is no limit to how many activist clusters there can be in the world. Below are some instructions on how we did it. Of course, there is a multitude of other ways to do it. We want to share our experiences.
1. Throw a party with friends who share similar interests. Cook some food if you like, or buy some beer, it is up to what you prefer. Make sure you have internet connectivity and encourage people to bring laptops. Play music. Or, if you do not have a place to entertain, find a pub or internet cafe that you can meet in and bring your laptops too.
2. Start an IRC-channel and spread all over the internet that this is the place where stuff happens. Use a cool network such as Freequest or Anonnet. Get an IRC shell and dive in. "Your home is where your shell is" (who said that?)
3. Gather friends with various skills. You will need coders as well as philosophers, people who know politics and people who know Photoshop (
@larrasket
larrasket / rendezvous.go
Created November 7, 2025 14:20
An example for rendezvous in Go
package main
import (
"errors"
"fmt"
"strings"
"sync"
)
var hdText = `Humpty Dumpty sat on a wall.
@larrasket
larrasket / lispmode.jl
Created July 6, 2024 10:59 — forked from brenhinkeller/lispmode.jl
Bare-bones REPL for Julia's secret built-in s-expression syntax, in under 30 lines
to_expr(x) = x
to_expr(t::Tuple) = Expr(to_expr.(t)...) # Recursive to_expr implementation courtesy of Mason Protter
lisparse(x) = to_expr(eval(Meta.parse(x))) # Note that the `eval` in here means that any normal (non-s-expression) Julia syntax gets treated a bit like a preprocessor macro: evaluated _before_ the s-expression syntax is compiled and evaluated
function lispmode()
# READ
printstyled("\nlisp> ", color=:magenta, bold=true)
l = readline()
while l !== "(:exit)"
try # So we don't get thrown out of the mode
# EVAL
@larrasket
larrasket / setcookie.go
Created April 15, 2024 14:57 — forked from NaniteFactory/setcookie.go
chromedp set-cookie example
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/cdproto/network"
@larrasket
larrasket / toggle-internet-keep-network.sh
Created February 24, 2023 12:58
Toggle internet connection but keep network
#!/bin/bash
# Check if the internet connection is currently active
ping -q -c 1 -W 1 google.com > /dev/null
if [ $? -eq 0 ]
then
# If the internet connection is active, turn it off by removing the default gateway
echo "Turning off internet connection"
sudo ip route del default
else
@larrasket
larrasket / Download PDFs from Quran Explorer or Quran Archive.org
Last active January 20, 2023 00:20
Download PDFs from Quran Explorer/Quran Archive
@larrasket
larrasket / pgnmentor.txt
Last active January 11, 2023 22:37
Download an abundance list of master chess game, grouped by players and openings
To download all the files, simple run:
cat pgnmentor.txt | parallel --gnu "wget --no-check-certificate {}"
make sure that parallel is installed
@larrasket
larrasket / chess-babel.el
Last active November 19, 2025 20:59
Add org babel support for Portable Game Notation
;; this is another version that doesn't require any user parameters
(defun org-babel-execute:chess (body params)
"Execute a block of Chess code with org-babel.
This function is called by `org-babel-execute-src-block'."
(let* ((output-file (concat (file-name-sans-extension (buffer-file-name)) (format "_%s_chess_output.svg" (format-time-string "%Y-%m-%d_%H-%M-%S")) ))
(notation (cdr (assq :notation params)))
(extension (if (equal notation "fen") ".fen" ".pgn"))
(notation-file (make-temp-file "chess-notation" nil extension))
(cmd (format "python ~/configs/elchess.py %s %s %s" notation-file output-file notation)))
@larrasket
larrasket / full-to-first-and-last-name.py
Last active January 1, 2023 21:10
Python script to split full name column in csv to first and last name columns
import csv
import sys
# Get the filename from the command line arguments
filename = sys.argv[1]
# Open the file in read mode
with open(filename, 'r') as csv_file:
# Read the file into a CSV reader object
reader = csv.reader(csv_file)
@larrasket
larrasket / add-column-to-cvs.py
Last active December 30, 2022 13:51
Python script to add a column to cvs file with a default value
#!/usr/bin/env python3
import csv
import sys
# Read command line arguments
field_name = sys.argv[1]
default_value = sys.argv[2]
# Open the input CSV file