Skip to content

Instantly share code, notes, and snippets.

@diaswrd
diaswrd / iterm-zprofile
Created March 23, 2023 18:56
Pleasant green/purple font colors in ~/.zprofile for iterm2 (with git branch name)
# Set CLICOLOR if you want Ansi Colors in iTerm2
export CLICOLOR=1
# Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color
function parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/(\1)/p'
}
end: options => {
verifyRecorderIsAvailable(CONTROL_NAMES.complete);
logger.crumb({
level: LogLevel.Info,
message: 'Recorder: recorder_s3: End recording options',
context: { options },
});
// Modify the metadata that's sent for completing the recorder
0xadc850d81215f65990e8be37f7bffc55f30d61ae
@diaswrd
diaswrd / GIF-Screencast-OSX.md
Created August 24, 2017 19:42 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

0x75d783701ee10d36dcf231c07b165fe06e2a14e9
@diaswrd
diaswrd / apiMemoryLeaks.md
Last active August 4, 2016 20:01
API Memory Leaks cause

API Memory Leaks

So, I think I finally understand why this is happening when our APIs start:

image

This is not being caused by the huge amount of before/after remote calls in our main API like we first thought. It is instead caused by the amount of multiple before/afteRemotes on the same remote method (endpoint).

How to Fix

@diaswrd
diaswrd / naga_1920_1080.lua
Last active March 12, 2016 00:33
Naga farm lua script 1920x1080 6.86
sleepTime = 50;
function OnEvent(event, arg)
if (event == "MOUSE_BUTTON_RELEASED" and arg == 6) then
-- select all illusions
PressKey("2");
ReleaseKey("2");
Sleep(sleepTime);
-- send them to radiant hard camp (middle jungle)
@diaswrd
diaswrd / bruno_help.js
Created January 20, 2016 19:05
bruno_help.js
MerchantCampaign.find({
filter: {
where: {
merchantId: $scope.user.merchantId
}
}
}, function (campaignList) {
$scope.campaignList = campaignList;
Offer.find({