Skip to content

Instantly share code, notes, and snippets.

View garrettmaring's full-sized avatar
🐉
Engi

Garrett Maring garrettmaring

🐉
Engi
View GitHub Profile
@marcusbuffett
marcusbuffett / find_unpushed_branches.py
Created June 19, 2019 19:19
Finds branches which are ahead of their remote tracking branch
import os
from subprocess import Popen, PIPE, check_output, STDOUT, CalledProcessError
import shlex
list_branches_command = "git for-each-ref --sort=committerdate refs/heads/ --format='%(refname:short)'"
pipe = Popen(list_branches_command, shell=True, stdout=PIPE)
for branch in pipe.stdout:
branch = branch.strip().decode("utf-8")
get_remote_command = f"git rev-parse --abbrev-ref --symbolic-full-name {branch}@{{u}}"
@naesheim
naesheim / buildWhenAffected.sh
Last active November 28, 2022 20:20
CircleCi - only build features that has changed
##################
### config.yml ###
##################
version: 2
jobs:
build:
docker:
- image: circleci/python:3.6
steps:
@Koze
Koze / AVSpeechSynthesizer.swift
Last active December 1, 2018 23:14
AVSpeechSynthesizer on swift playground.
import UIKit
import AVFoundation
import XCPlayground
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
let string = "あのイーハトーヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモーリオ市、郊外のぎらぎらひかる草の波。またそのなかでいっしょになったたくさんのひとたち、ファゼーロとロザーロ、羊飼のミーロや、顔の赤いこどもたち、地主のテーモ、山猫博士のボーガント・テストゥパーゴなど、いまこの暗い巨きな石の建物のなかで考えていると、みんなむかし風のなつかしい青い幻燈のように思われます。"
let synthesizer = AVSpeechSynthesizer()
let voice = AVSpeechSynthesisVoice(language: "ja_JP")
let utterance = AVSpeechUtterance(string: string)
@ScottSmith95
ScottSmith95 / Share-Sheet.html
Last active October 22, 2021 13:40
A responsive web version of iOS Share Sheets. More info: https://ScottHSmith.com/projects/share-sheets/
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
font: normal 300 1em sans-serif;
}
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a