Skip to content

Instantly share code, notes, and snippets.

View mswieboda's full-sized avatar

Matt Swieboda mswieboda

View GitHub Profile
@mswieboda
mswieboda / squash.md
Last active November 21, 2024 16:51
Git rebase to squash commits

Say you have a few commits on a branch and want to squash them all

(done via git log --oneline)

3cf1e45e Refactor
7bfc2e3b Cleanup
c203f2ba Did some fixes, adds tests
e28ebc36 Adds feature XYZ
d3ee6f4e Commit not to squash 
@mswieboda
mswieboda / tap-to-click-toggle.scpt
Created July 11, 2020 03:18
macOS: Quickly toggle "Tap to click" for the Trackpad by using AppleScript
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
delay 1
click the menu item "Trackpad" of the menu "View" of menu bar 1
delay 1
click the radio button "Point & Click" of the first tab group of window "Trackpad"
click checkbox 3 of tab group 1 of window "Trackpad"
@mswieboda
mswieboda / mac-key-repeat.md
Last active July 11, 2020 03:02
macOS key repeat

In terminal:

# normal minimum is 15 (225 ms)
$ defaults write -g InitialKeyRepeat -int 10

# normal minimum is 2 (30 ms)
$ defaults write -g KeyRepeat -int 1

$ defaults read -g InitialKeyRepeat

Keybase proof

I hereby claim:

  • I am mswieboda on github.
  • I am mswieboda (https://keybase.io/mswieboda) on keybase.
  • I have a public key ASDQnVUS7WV1EPftbY5yCJq-wYR-doQP1WhJOwx1mY4Gbgo

To claim this, I am signing this object:

@mswieboda
mswieboda / cray-test.cr
Last active March 29, 2019 17:05
Crystal Game Development
require "cray"
module CrayTest
SCREEN_WIDTH = 1024
SCREEN_HEIGHT = 768
LibRay.init_window SCREEN_WIDTH, SCREEN_HEIGHT, "Example: input"
@@icon = LibRay.load_image File.join(__DIR__, "circle.png")
@@circle = LibRay.load_texture_from_image(@@icon)
@mswieboda
mswieboda / slack-append-custom-css.js
Created March 22, 2019 17:45
Theming Slack (ver 3.3.8)
document.addEventListener("DOMContentLoaded", function() {
let webviews = document.querySelectorAll(".TeamView webview");
const cssPath = 'https://raw.githubusercontent.com/Nockiro/slack-black-theme/master/custom.css';
let cssPromise = fetch(cssPath).then(response => response.text());
let customCustomCSS = `
:root {
--primary: #ccc;
--text: #0f0;
@mswieboda
mswieboda / SmoothFollow.cs
Created November 28, 2017 00:26 — forked from Hamcha/SmoothFollow.cs
Stupid Unity scripts : "Smooth Follow" from Standard Assets
// Smooth Follow from Standard Assets
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead.
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;
@mswieboda
mswieboda / AZDMG.md
Created August 9, 2017 16:52
Adding Zero Downtime Migrations Gem AzDMG
@mswieboda
mswieboda / ruby-progressbar-example.rb
Created June 5, 2017 16:10
Using ruby-progressbar for long command line tasks
#!/usr/bin/env ruby
require 'ruby-progressbar'
commands = [
{
description: 'changing into Centro Direct directory',
command: 'cd ~/dev/centro-media-manager/'
},
{
@mswieboda
mswieboda / slack-dark.rb
Last active May 30, 2017 18:41
Script to copy custom Slack index.js when it gets updated and changes overridden
#!/usr/bin/env ruby
require 'active_support'
require 'active_support/core_ext'
require 'thor'
# Usage:
# ./slack-dark.rb
# ./slack-dark.rb [NEW_INDEX_FILE]
#