Skip to content

Instantly share code, notes, and snippets.

@ulasozguler
ulasozguler / remove_sl_icon.sh
Created February 4, 2017 18:58
Remove spotlight icon from menu bar.
cd /System/Library/CoreServices/Spotlight.app/Contents/MacOS
sudo cp Spotlight Spotlight.bak
sudo perl -pi -e 's|(\x00\x00\x00\x00\x00\x00\x47\x40\x00\x00\x00\x00\x00\x00)\x42\x40(\x00\x00\x80\x3f\x00\x00\x70\x42)|$1\x00\x00$2|sg' Spotlight
cmp -l Spotlight Spotlight.bak
sudo codesign -f -s - Spotlight
sudo killall Spotlight
# This gist is compatible with Ansible 1.x .
# For Ansible 2.x , please check out:
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6
# - https://github.com/n0ts/ansible-human_log
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@ulasozguler
ulasozguler / hexagons.js
Created October 25, 2016 17:07 — forked from zackthehuman/hexagons.js
Drawing a hexagonal grid with HTML canvas
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Canvas Hexagonal Map</title>
<style type="text/css">
canvas {
border:0;
display:block;
margin:0 auto;
@ulasozguler
ulasozguler / hotfix_shortcut.sh
Created October 8, 2015 19:44
Create and finish a hotfix with currently uncommited files. Usage: hotfixx branch_name "commit message"
hotfixx() {
git stash
git flow hotfix start $1
git stash pop
git commit -am "$2"
export GIT_MERGE_AUTOEDIT=no
git flow hotfix finish -Fn $1
unset GIT_MERGE_AUTOEDIT
git push origin develop
git push origin master
@ulasozguler
ulasozguler / timeformat.sh
Created June 8, 2015 19:00
Changes OS X menu bar time format to whatever the fuck you want.
#!/bin/bash
killall -KILL SystemUIServer
killall -KILL SystemUIServer &> /dev/null
echo "Press CTRL+C when format changes."
if [ -z "$1" ]; then format="YYYY.MM.dd HH:mm:ss"; else format="$1"; fi
while true
do
defaults write com.apple.menuextra.clock "DateFormat" "$format"
done