Skip to content

Instantly share code, notes, and snippets.

@braitom
braitom / gist:9c687fd78251c23b45bfd1f5acee38cd
Created April 7, 2019 01:16
Deleting unused iOS Simulators
$ xcrun simctl delete unavailable
@braitom
braitom / gist:2db238b9391d0cdd5bac4fedff82a857
Last active February 4, 2019 17:05
git log by commit
git log --name-only --oneline | grep -v ' ' | sort | uniq -c | sort -n
function prompt
{
$Time = (Get-Date).ToString("hh:mm")
$host.ui.rawui.WindowTitle = (Get-Location)
"$Time> "
}
@braitom
braitom / o365_auditlog_export.ps1
Last active August 30, 2018 06:38
Export O365 Auditlog
$UserCredential = Get-Credential
$ProxyOptions = New-PSSessionOption -ProxyAccessType "IEConfig"
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
$scriptStart=(get-date)
$sessionName = "auditlog"
@braitom
braitom / delete_mergedbranch
Last active October 15, 2018 15:28
delete all merged branch
$ git checkout master && git branch --merged | grep -v '*' | xargs -I % git branch -d %
or
$ git branch --merged | grep -vE '^\*|master$|develop$' | xargs -p -I % git branch -d %
@braitom
braitom / .zshrc
Created April 11, 2017 13:17
.zshrc for ubuntu on windows 10
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="wedisagree"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
@braitom
braitom / 0_reuse_code.js
Created January 14, 2016 00:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@braitom
braitom / Vagrantfile
Last active August 29, 2015 14:21
vagrantfile for influxdb 0.9.0-rc30
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
apt-get upgrade
apt-get update
echo "Asia/Tokyo" | sudo tee /etc/timezone
@braitom
braitom / subscribe_mqtt.py
Last active August 29, 2015 14:21
MQTT subscribe sample
# -*- coding: utf-8 -*-
import paho.mqtt.client as mqtt
def on_connect(client, userdata, flags, rc):
print("Connected with result code " + str(rc))
client.subscribe("test/iOS")
@braitom
braitom / .gitignore
Created January 26, 2015 05:36
gitignore for Carthage
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3