Skip to content

Instantly share code, notes, and snippets.

@lavantien
lavantien / modern-software-engineering-resources.md
Last active May 6, 2024 06:45
Modern Software Engineering Resources

Modern Software Engineering

Knowledge and Education should be open and free. Hierarchy and Exploitation must be abolished.

Wayback Machine (archive of the internet), Anna's Archive (open ebooks/papers library), 1337x (archive of all media).

  • Z. (down) Notes below. Avoid all funnel sales and paid bootcamps at all cost, if you spent money, there's something wrong, and you're just feeding the scammers and grifters while wasting your time and resources. Also don't forget good OpSec, self defense gears, and physical/mental strength.
  • A. (go) Development Environment (10 items) (Linux, Neovim, Dev Tools, Languages, Configs, Security, and Dotfiles).
  • B. (go) Complementary Subjects (287 items) (Linguistics, English, Security, OpSec, Psychology, Anthropology, History, Philosophy, Economics, Business, Cooking, Xenology, and Sel
@atchim
atchim / node_motion.lua
Last active May 6, 2024 06:44
Neovim Tree-Sitter node motion
local api = vim.api
local ctrlv = api.nvim_replace_termcodes('<C-V>', true, true, true)
local function exit_vmode()
local mode = vim.fn.mode()
if mode ~= 'v' or mode ~= 'V' or mode ~= ctrlv then
vim.cmd('normal! ' .. mode)
end
end
@siph
siph / building_a_standalone_nixvim.md
Created September 10, 2023 23:51
Building a standalone nixvim configuration

Building a standalone nixvim configuration

A standalone configuration is one that exists in its own project/repository. This means that you can externalize your entire neovim configuration, including flake inputs, nixpkgs version, etc...

This decoupling of neovim and NixOS configurations has multiple advantages including mixing stable/unstable nixpkgs and the ability to run your neovim configuration outside of your NixOS configuration. You can even run it outside of NixOS all together.

@windsting
windsting / nginx-stat-failed-13-permission-denied.md
Last active May 6, 2024 06:43
fix: Nginx: stat() failed (13: permission denied)

Nginx: stat() failed (13: permission denied)

from https://stackoverflow.com/questions/25774999/nginx-stat-failed-13-permission-denied

Nginx operates within the directory, so if you can't cd to that directory from the nginx user then it will fail (as does the stat command in your log). Make sure the www-user can cd all the way to the /username/test/static. You can confirm that the stat will fail or succeed by running

sudo -u www-data stat /username/test/static
@c5inco
c5inco / HeartRate.kt
Last active May 6, 2024 06:40
Jetpack Compose implementation of inspiration: https://twitter.com/amos_gyamfi/status/1494053914945236999
package des.c5inco.material3
import android.graphics.Matrix
import android.graphics.Path
import androidx.compose.animation.core.*
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
@nathanhaigh
nathanhaigh / deinterleave_fastq.sh
Last active May 6, 2024 06:38
deinterleave FASTQ files
#!/bin/bash
# Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress]
#
# Deinterleaves a FASTQ file of paired reads into two FASTQ
# files specified on the command line. Optionally GZip compresses the output
# FASTQ files using pigz if the 3rd command line argument is the word "compress"
#
# Can deinterleave 100 million paired reads (200 million total
# reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s)
#
using UnityEditor;
using UnityEngine;
public sealed class ExampleClass : EditorWindow
{
private static readonly string[] mList =
{
"AboutWIndowLicenseLabel" ,
"AC LeftArrow" ,
"AC RightArrow" ,
@PyroGenesis
PyroGenesis / Instructions.md
Last active May 6, 2024 06:37
Instructions for dumping stack information of Winforms application using WER

Instructions

  1. Follow the instructions here to enable WER. Make sure the DumpType is set to 2 (Full Dumps).
  2. Make a new Module (static Class in C#) called ProgramEntryPoint.
  3. Copy the code written below and don't forget to change YOUR_STARTUP_FORM_NAME_HERE.
  4. Change project configuration to Debug
  5. Go to Project Properties. In the Application tab, uncheck "Enable application framework".
  6. Change Startup Object to Sub Main.
  7. Go to Debug -> Windows -> Exception Settings and make sure Common Language Runtime Exceptions is checked (full checked and not partially checked).
  8. Now whenever an unhandled exception occurs, your application will quit and a .dmp file will be created in the folder specified in the DumpFolder registry key.
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 6, 2024 06:36
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@noteeeeee
noteeeeee / JetBrainsActivation.md
Last active May 6, 2024 06:35
Webstorm/JetBrains products activation 2024 (Windows/MacOS)

Webstorm/JetBrains products activation 2024 (Windows/MacOS)

1.Proxy Settings

  1. Step 1: Navigate to Proxy settings.
  2. Step 2: Select "Manual proxy settings - HTTP".
    • Hostname: localhost
    • Port: 80

Set no proxy for: