Skip to content

Instantly share code, notes, and snippets.

View michaelgold's full-sized avatar

Michael Gold michaelgold

View GitHub Profile
@kconragan
kconragan / keyrepeat.shell
Last active December 4, 2023 03:40
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@wormeyman
wormeyman / Source_Code_Pro_Powershell_font.ps1
Last active March 10, 2020 10:26
Set Adobe's Source Code Pro as a PowerShell font option.
#Reference: http://michaellwest.blogspot.com/2013/03/add-font-to-powershell-console.html
#Reference: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q247815 This explains why we name it 000
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont' #Get the properties of TTF
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont' -Name 000 -Value 'Source Code Pro' #Set it to SCP
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont' #Check to see if we properly set it so that SCP is an option
@diverted247
diverted247 / README
Last active March 21, 2024 18:55
Export slides from Google Slides as SVG - Console Script (Chrome tested)
To export SVG from Google Slides.
1. Open Slide deck.
2. View -> 100%
3. Click on every thumbnail from first to last, this puts the SVG into the DOM.
4. Paste the export.js in the console.
5. Make sure to allow multiple downloads.
6. All SVG should be in Downloads folder.
Cheers,
@CSaratakij
CSaratakij / .tmux.conf
Last active June 22, 2024 08:10
Tmux's Config that's very close to i3wm (Setting with an idea of using tmux without x-server)
# Config that is very close to a i3 window manager's keybinding.
set -s escape-time 0
setw -g aggressive-resize on
# First remove *all* keybindings
unbind-key -a
# List keys
bind-key ? list-keys
@dmidlo
dmidlo / pltask.zsh
Last active October 17, 2017 19:17
#pltask functions
## pltask is a lightweight facade to taskwarrior for use with Powerlevel9k's Second Prompt Prefix (by dmidlo @querentCode)
## Be sure to set search.case.sensitive=no within .taskrc
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="\n"
pltask () {
setNewlinePrompt () {
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="%K{white}%F{black}\n $1 %f%k%F{white}%f $ "
@bittner
bittner / keyboard-keys.md
Created February 28, 2019 22:50
Keyboard keys markup in MarkDown

Ctrl + Alt + Space

@tin2tin
tin2tin / basic_ui_documented.py
Last active May 22, 2024 13:24 — forked from AzureDVBB/basic_ui_documented.py
A commented template for making simple UI in blender using the bpy python API
#import the bpy module to access blender API
import bpy
#WARNING: this is written and tested for blender 2.79
#blender 2.8 and newer will likely have a different python API
#create a property group, this is REALLY needed so that operators
#AND the UI can access, display and expose it to the user to change
#in here we will have all properties(variables) that is neccessary
class CustomPropertyGroup(bpy.types.PropertyGroup):
@silver-xu
silver-xu / ts-boilerplate.md
Last active June 19, 2024 15:10
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@haykkh
haykkh / fastapi-discord.py
Created June 24, 2020 10:09
How to run a discord.py bot with FastAPI
import asyncio
import discord
from fastapi import FastAPI
app = FastAPI()
client = discord.Client()
# where the magic happens
# register an asyncio.create_task(client.start()) on app's startup event
@tafaust
tafaust / application.py
Created April 21, 2022 19:41
FastAPI singleton service dependency injection across multiple requests
import random
import click
import uvicorn
from fastapi import FastAPI, APIRouter, Depends, Request
# Service
class MySingletonService:
def __init__(self):