Skip to content

Instantly share code, notes, and snippets.

@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active May 8, 2024 06:18
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally
  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

*.ipynb filter=strip-notebook-output  
@tuklusan
tuklusan / tops-10-from-tape.log-01
Last active May 8, 2024 06:16
PDP-10 TOPS-10 Operating System Install From Tapes on Latest SIMH 4 : Part-1
Installation of TOPS-10 operating system fresh from tapes on SIMH PDP-10 using
latest SIMH 4.0 PDP-10 V4.0-0 (git commit id: 314a1da9). This is a screen session
log of executing the awesome procedure documented at:
http://www.asun.net/pdp10/downloads/t10inst.txt
Visit the above URL for very helpful tips.
- Supratim Sanyal (http://tuklusan.decsystem.org)
----
Script started on 2019-03-17 22:10:04+00:00 [TERM="xterm-256color" TTY="/dev/pts/5" COLUMNS="80" LINES="37"]
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 8, 2024 06:16
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@swiftui-lab
swiftui-lab / tree-layout-example.swift
Last active May 8, 2024 06:13
A Tree Layout Example (SwiftUI)
// Author: SwiftUI-Lab (swiftui-lab.com)
// Description: A Tree Layout example
// blog article: https://swiftui-lab.com/layout-protocol-part-2
import SwiftUI
struct TreeNode: Identifiable {
var parentId: UUID? = nil
let id: UUID = UUID()
let name: String
@flavienbwk
flavienbwk / rsatool.py
Last active May 8, 2024 06:06
Generates a private key from the modulus, prime1 and prime2 parameters.
#!/usr/bin/env python2
# Usage : python rsatool.py -n <decimal_modulus> -p <decimal_prime1> -q <decimal_prime2> -e 65537 -v DER -o private.key
import base64, fractions, optparse, random
try:
import gmpy
except ImportError as e:
try:
import gmpy2 as gmpy
@NdR91
NdR91 / frigate_telegram_notification.yaml
Last active May 8, 2024 06:01
Frigate - Telegram Notification
blueprint:
name: Frigate - Telegram Notification
description: Create automations to receive Snapshots and Clips from Frigate
domain: automation
input:
camera:
name: Frigate Camera
description: The name of the camera as defined in your frigate configuration (/conf.yml).
target_chat:
name: Target
@shigenobuokamoto
shigenobuokamoto / network-mirrored.service
Last active May 8, 2024 06:01
/etc/systemd/system/network-mirrored.service
[Unit]
Wants=network-pre.target
Before=network-pre.target shutdown.target
[Service]
User=root
ExecStart=/bin/sh -ec '\
[ -x /usr/bin/wslinfo ] && [ "$(/usr/bin/wslinfo --networking-mode)" = "mirrored" ] || exit 0;\
echo "\
add chain ip nat WSLPREROUTING { type nat hook prerouting priority dstnat - 1; policy accept; };\
@icebob
icebob / k3s_helm_install.sh
Last active May 8, 2024 06:00
K3S + Helm installing
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Copy k3s config
mkdir $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chmod 644 $HOME/.kube/config
# Check K3S
kubectl get pods -n kube-system
@odan
odan / nginx-php-windows-setup.md
Last active May 8, 2024 05:59
Nginx and PHP Setup on Windows

Nginx and PHP Setup on Windows

For local development you could also use Nginx with PHP as an replacement for XAMPP.

Install Nginx

@igniteflow
igniteflow / corsdevserver.py
Created April 22, 2013 15:34
A simple CORS compliant web server in Python, useful for development (with @alex-moon)
import BaseHTTPServer
import cgi
from pprint import pformat
PORT = 6969
FILE_TO_SERVE = 'path/to/your/response/content.json'
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""