Skip to content

Instantly share code, notes, and snippets.

View sideseal's full-sized avatar
👋
Hello!

sideseal sideseal

👋
Hello!
View GitHub Profile
@bert
bert / README
Created July 15, 2011 21:01
Bresenham Algorithms in C
Some possible implementations of the Bresenham Algorithms in C.
The Bresenham line algorithm is an algorithm which determines which points in an
n-dimensional raster should be plotted in order to form a close approximation
to a straight line between two given points.
It is commonly used to draw lines on a computer screen, as it uses only integer
addition, subtraction and bit shifting, all of which are very cheap operations
in standard computer architectures.
It is one of the earliest algorithms developed in the field of computer graphics.
A minor extension to the original algorithm also deals with drawing circles.
@motoishmz
motoishmz / osxSetup.command
Last active February 3, 2023 07:47 — forked from rettuce/osxSetup.command
osx setup command. use com.apple.dock.plist
#!/bin/sh
### Desktop & Screen Saver
# Desktopを黒に
echo "Change Desctop Pictures"
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Black.png"'
# ScreenSaver Kill
echo "Disable screensaver"
@mjhea0
mjhea0 / audit_mixin.py
Created December 7, 2016 14:12 — forked from techniq/audit_mixin.py
Useful SQLAlchemy Mixins
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
@remarkablemark
remarkablemark / vim-prettier-vundle.md
Created March 19, 2018 15:03
How to install vim-prettier with Vim Vundle

vim-prettier

Open vimrc:

vim ~/.vim/vimrc

Add Vundle plugin to vimrc:

Plugin 'prettier/vim-prettier'
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active January 1, 2026 16:57
set -e, -u, -o, -x pipefail explanation
@MayankFawkes
MayankFawkes / sources.list
Created August 6, 2020 03:13
Ubuntu 20.04 LTS (ARM64) (Focal Fossa) -- Full sources.list
deb http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse
@swetoast
swetoast / gist:32d382fc714f1bda0850bfe09d0cb09e
Last active March 20, 2025 21:38
ubuntu-ports mirrorlist
http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports
http://ports.ubuntu.com/ubuntu-ports
https://mirror.kumi.systems/ubuntu-ports
https://mirrors.aliyun.com/ubuntu-ports/
http://mirrors.mit.edu/ubuntu-ports/
https://ftp.ubuntu-tw.org/mirror/ubuntu-ports/
https://mirror.yandex.ru/ubuntu-ports/
https://mirror.scaleuptech.com/ubuntu-ports/
https://mirrors.ustc.edu.cn/ubuntu-ports/
https://mirror.csclub.uwaterloo.ca/ubuntu-ports/
@gagregrog
gagregrog / bash_menu.sh
Created August 23, 2021 03:29
Ephemeral Interactive Bash Menu with Up/Down selection or numeral selection
# Original solution sourced from:
# https://unix.stackexchange.com/questions/146570/arrow-key-enter-menu
#
# Updated to do the following:
# - Display index with each option
# - Choose options 1-9 with numeric input
# - Clear the menu and reset the cursor when an option is selected
#
# Arguments:
# array of options
Git commands Cheat Sheet
Initialize a new git repository:
git init
Set configuration values for your username and email:
git config --global user.name <your-name>
git config
--global user. email <your-email>
Clone a repository: