Skip to content

Instantly share code, notes, and snippets.

@squarism
squarism / iterm2.md
Last active May 4, 2024 13:06
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@Nikolaj-K
Nikolaj-K / category_theory_literature.md
Last active May 4, 2024 13:04
Recomended reading for the undergrad category theorist
@Hertzole
Hertzole / SceneObject.cs
Last active May 4, 2024 13:04
Unity scene object to easily assign scenes in the inspector.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[System.Serializable]
public class SceneObject
{
[SerializeField]
private string m_SceneName;
@Julian-Nash
Julian-Nash / flask_sitemap_generator.py
Last active May 4, 2024 13:03
Flask dynamic sitemap generator
@app.route("/sitemap")
@app.route("/sitemap/")
@app.route("/sitemap.xml")
def sitemap():
"""
Route to dynamically generate a sitemap of your website/application.
lastmod and priority tags omitted on static pages.
lastmod included on dynamic content such as blog posts.
"""
from flask import make_response, request, render_template
@panchalkalpesh
panchalkalpesh / git-aliases.md
Last active May 4, 2024 13:03 — forked from ypwu1/git-aliases.md
The Ultimate Git Alias Setup · GitHub

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@Klerith
Klerith / index.ts
Last active May 4, 2024 13:02
Vuex + TypeScript - Store Structure Strongly Typed
import { createStore } from 'vuex';
// My custom modules
import exampleModule from './module-template';
import { ExampleStateInterface } from './module-template/state';
export interface StateInterface {
// Define your own store structure, using submodules if needed
// example: ExampleStateInterface;
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 4, 2024 12:55
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Mastering Programming - by Kent Beck

From years of watching master programmers, I have observed certain common patterns in their workflows. From years of coaching skilled journeyman programmers, I have observed the absence of those patterns. I have seen what a difference introducing the patterns can make. Here are ways effective programmers get the most out of their precious 3e9 seconds on the planet. The theme here is scaling your brain. The journeyman learns to solve bigger problems by solving more problems at once. The master learns to solve even bigger problems than that by solving fewer problems at once. Part of the wisdom is subdividing so that integrating the separate solutions will be a smaller problem than just solving them together.

Time

Slicing - Take a big project, cut it into thin slices, and rearrange the slices to suit your context. I can always slice projects finer and I can always find new permutations of the slices that meet different needs

@kainjow
kainjow / libproc_example.swift
Created November 24, 2018 20:09
Swift example of C libproc API
import Darwin
// Call proc_listallpids once with nil/0 args to get the current number of pids
let initialNumPids = proc_listallpids(nil, 0)
// Allocate a buffer of these number of pids.
// Make sure to deallocate it as this class does not manage memory for us.
let buffer = UnsafeMutablePointer<pid_t>.allocate(capacity: Int(initialNumPids))
defer {
buffer.deallocate()
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 4, 2024 12:48
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus