Skip to content

Instantly share code, notes, and snippets.

View daephx's full-sized avatar
💢

Daemon daephx

💢
View GitHub Profile
@bcomnes
bcomnes / .bash_profile
Last active October 6, 2021 15:38
bashrc utopia
#
# ~/.bash_profile
#
# Do everything in bashrc
[[ -f ~/.bashrc ]] && . ~/.bashrc
@kigiri
kigiri / aligning-images.md
Created September 18, 2018 09:11 — forked from DavidWells/aligning-images.md
Guide to aligning images in github readme.md files

Aligning images

left alignment

This is the code you need to align images to the left:

@SonOfDiablo
SonOfDiablo / download_geckodriver.ps1
Last active January 31, 2023 02:37
A script to download and unzip geckodriver, and then add it to the user path.
$ProgressPreference='SilentlyContinue'
Write-Host "Finding OS Architecture: " -ForegroundColor DarkCyan -NoNewline
# Find Os Architecture
if((Get-ComputerInfo).OsArchitecture -eq "64-bit"){
$arch = "*win64*"
Write-Host "64-bit" -ForegroundColor Green
}else{
$arch = "*win32*"
Write-Host "32-bit" -ForegroundColor Green
@jamietre
jamietre / .zshrc-wsl-windows-terminal
Last active June 12, 2023 03:20
zsh config for windows-like inline editing using Windows Terminal + wsl
# add this to your .zshrc
r-delregion() {
if ((REGION_ACTIVE)) then
zle kill-region
else
local widget_name=$1
shift
zle $widget_name -- $@
fi
@cartr
cartr / gist:7851463
Created December 7, 2013 23:48
Pygame Boilerplate
import pygame
pygame.init() #Start Pygame
screen = pygame.display.set_mode((640,480)) #Start the screen
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT: #The user closed the window!
running = False #Stop running
@iminurnamez
iminurnamez / state_engine.py
Last active October 3, 2023 13:04
Simple state engine example
#This code is licensed as CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/legalcode).
import sys
import pygame as pg
class Game(object):
"""
A single instance of this class is responsible for
managing which individual game state is active
@SidharthArya
SidharthArya / alttab
Last active November 17, 2023 22:50
Sway Windows Manager Alt Tab behavior
#!/usr/bin/env python3
import sys
import json
import subprocess
direction=bool(sys.argv[1] == 't' or sys.argv[1] == 'T')
swaymsg = subprocess.run(['swaymsg', '-t', 'get_tree'], stdout=subprocess.PIPE)
data = json.loads(swaymsg.stdout)
current = data["nodes"][1]["current_workspace"]
@YumaInaura
YumaInaura / README.md
Last active November 21, 2023 05:48
Gist — Manage in one repository many gists by using git submodule

Gist — Manage in one repository many gists by using git submodule

Gist is a nice service. We can write code so easily and manage files as repository.

But bad points are …

  • Many repository
  • Gist destributes random hash to perticular gists (repositories).
  • So difficult to find or remember contents as repository.
@jacklorusso
jacklorusso / workbench.colorCustomizations.json
Last active December 19, 2023 07:40
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@endolith
endolith / AutoCorrect.ahk
Last active January 31, 2024 14:02
AutoCorrect AutoHotkey spelling script
; c = case sensitive
; c1 = ignore the case that was typed, always use the same case for output
; * = immediate change (no need for space, period, or enter)
; ? = triggered even when the character typed immediately before it is alphanumeric
; r = raw output
;------------------------------------------------------------------------------
; CHANGELOG:
;
; 2011-03-21 and after: See readme.md