Skip to content

Instantly share code, notes, and snippets.

View aalemayhu's full-sized avatar
💭
If at first the idea is not absurd, then there is no hope for it - Albert

Alexander Alemayhu aalemayhu

💭
If at first the idea is not absurd, then there is no hope for it - Albert
View GitHub Profile
@aalemayhu
aalemayhu / gh_dependabot.sh
Created March 26, 2023 08:53 — forked from robcowie/gh_dependabot.sh
gh cli commands to work with Dependabot PRs
# Github CLI commands to work with dependabot PRs
# List dependabot PRs that need review
gh pr list -l dependencies --search "status:success review:none"
gh pr list -A app/dependabot --search "status:success review:none"
# Instruct dependabot to merge all reviewed PRs, oldest first
gh pr list \
-A app/dependabot \
--search "status:success review:approved" \
# /usr/bin/notify-site-is-down.rb
require "rubygems"
require "twilio-ruby"
account_sid = ENV["TWILIO_ACCOUNT_SID"]
auth_token = ENV["TWILIO_AUTH_TOKEN"]
@client = Twilio::REST::Client.new account_sid, auth_token
@aalemayhu
aalemayhu / SparkGraph.playground
Last active August 29, 2015 14:25 — forked from blakejakopovic/SparkGraph.playground
Test xcode migrator tool
import Cocoa
import XCPlayground
@IBDesignable
class SparkGraph: NSView {
// Background Colour
@IBInspectable var backgroundColor:NSColor?
// Border
@aalemayhu
aalemayhu / tmux-cheatsheet.markdown
Last active August 29, 2015 14:19 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Make it smaller for printing

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
/**
* Draws a smiley inside the given rectangle. The mood value (0...1) is used
* to make the smiley happy or sad.
*
* @param rect Rectangle to draw the smiley into
* @param mood Happy (= 1) or sad (= 0) or anything in between
*/
-(void)drawSmileyInRect:(CGRect)rect withMood:(float)mood {
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSaveGState(ctx);
// http://go.googlecode.com/hg-history/release-branch.r60/doc/GoCourseDay1.pdf
package main
import (
"fmt"
"log"
"os/exec"
"strconv"
s "strings"