Skip to content

Instantly share code, notes, and snippets.

@aronson
aronson / README.md
Last active May 13, 2024 13:08
Cogmind Wineskin for Apple Silicon

Running Cogmind as a self-contained app on macOS

Cogmind can be run as a self-contained app on macOS with the modern version of Wineskin Server.

If you are interested in only the performance mods skip to here.

Installing Wineskin

Installing Rosetta 2 (Apple Silicon only)

Wineskin requires the Rosetta 2 framework available from Apple for free. Open your terminal.app from Applications and run the following command to install it if not already present:

@naviat
naviat / git_fixup_n_autosquash.md
Created March 10, 2020 03:48
Git commit fixup and autosquash

Git commit fixup and autosquash are helpful features when you want to “fix” changes from a single commit in your history.

If you discover that you want to change a single commit in your Git history, you would need to manually commit based on the commit you’re about to change and perform a git rebase. Fixup commits produce commits that fix a specific commit in history by appending a commit with message fixup!. An interactive rebase with --autosquash option will then merge the original commit and the fixup into a new commit and rebase the subsequent commits.

See the following history as an example:

3320dec (HEAD) commit 4
03c9685 commit 3
041c401 commit 2
@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@HackingGate
HackingGate / restore_last_git_modified_time.sh
Last active May 13, 2024 12:59
Retrieve and set the last modification date of all files in a git repository. Solution for https://stackoverflow.com/a/55609950/4063462
#!/bin/sh -e
OS=${OS:-`uname`}
if [ "$OS" = 'Darwin' ]; then
get_touch_time() {
date -r ${unixtime} +'%Y%m%d%H%M.%S'
}
else
# default Linux
@wakita
wakita / sudoku.py
Last active May 13, 2024 12:57
SMTソルバーを用いた数独の解
import numpy as np
from z3 import *
# 例題
board_spec = '''
39
1 5
3 5 8
8 9 6
7 2
@gregorypease280
gregorypease280 / zed_venv.sh
Created April 4, 2023 23:30
zed venv config
#Gets the current venv path and creates the pyrightconfig for zed
#activate your venv then run it
cofig_file_name="pyrightconfig.json"
current_venv="${current_venv:-$(basename ${VIRTUAL_ENV})}"
current_venv_path="${current_venv_path:-$(builtin cd ${VIRTUAL_ENV}; pwd)}"
project_path="${project_path:-./}"
config_path="${project_path}${cofig_file_name}"
config_venv="${config_venv:-${current_venv}}"
config_venv_path="${config_venv_path:-${current_venv_path}}"
@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 13, 2024 12:54 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active May 13, 2024 12:54 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@Tblue
Tblue / dump-firefox-cookies.py
Last active May 13, 2024 12:54
Firefox Cookie Dumper
#!/usr/bin/env python3
# vim: tw=120
#
########################################################################################################################
#
# Dump cookies from Firefox, as a Netscape Cookie File.
# Version: 1.0.1
#
# Required third-party Python packages:
#