Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
branch_name="$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)"
bold="$(tput bold)"
normal="$(tput sgr0)"
echo "${bold}Current branch: $branch_name${normal}"
echo ""
git for-each-ref --sort='-committerdate' --format='%(objectname:short) | %(committerdate:human) | %(refname)' refs/heads | sed -e 's/refs\/heads\///' | head -n 20 | while read line ; do
line_branch="$(echo $line|sed -e 's/.* | .* | \(.*\)/\1/')"
if test $line_branch = $branch_name ; then
echo "${bold}$line${normal}"
This file has been truncated, but you can view the full file.
High CPU usage DejaLu
Sampling process 9074 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling DejaLu (pid 9074) every 1 millisecond
Process: DejaLu [9074]
Path: /Applications/DejaLu.app/Contents/MacOS/DejaLu
Load Address: 0x10bfc3000
Identifier: me.dejalu.macapp
Version: 1.0 (176)
Process: DejaLu [8746]
Path: /Applications/DejaLu.app/Contents/MacOS/DejaLu
Identifier: me.dejalu.macapp
Version: 1.0 (177)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: DejaLu [8746]
User ID: 501
Date/Time: 2017-03-15 17:40:56.433 -0700

Keybase proof

I hereby claim:

  • I am dinhviethoa on github.
  • I am dinhvh (https://keybase.io/dinhvh) on keybase.
  • I have a public key whose fingerprint is 2792 D145 65DA 08E4 A2D6 CBFB 57B0 4BC7 F7DB 2CC9

To claim this, I am signing this object:

$ ./pull-all.sh
===== CLONING https://github.com/Polymer/HTMLImports.git =====
Cloning into 'HTMLImports'...
fatal: Remote branch not found in upstream origin
Unexpected end of command stream
===== CLONING https://github.com/Polymer/CustomElements.git =====
Cloning into 'CustomElements'...
fatal: Remote branch not found in upstream origin
Unexpected end of command stream
===== CLONING https://github.com/Polymer/PointerEvents.git =====
Pod::Spec.new do |s|
s.name = 'icu4c'
s.version = '0.1'
s.source = { :http => 'http://localhost/pub/icu4c-51_1-src.tgz' }
# s.header_dir = 'unicode'
s.source_files = 'source/common/**/*.{c,h,cpp}', 'source/i18n/**/*.{c,h,cpp}', 'source/io/**/*.{c,h,cpp}',
'source/layout/**/*.{c,h,cpp}', 'source/layoutex/**/*.{c,h,cpp}', 'source/config.h'
# s.exclude_files = 'src/tests/**/*', 'src/windows/**/*'
s.compiler_flags = '-DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DU_IO_IMPLEMENTATION'
s.public_header_files = '**/ucnv.h'
@dinhvh
dinhvh / gist:5997404
Created July 15, 2013 03:56
ctemplate.podspec
Pod::Spec.new do |s|
s.name = 'ctemplate'
s.version = '0.1'
s.source = { :git => 'https://github.com/dinhviethoa/ctemplate' }
s.header_dir = 'ctemplate'
s.source_files = 'src/**/*.{c,h,cc}'
s.exclude_files = 'src/tests/**/*', 'src/windows/**/*'
# s.compiler_flags = '"-I${PODS_ROOT}/ctemplate/src"'
s.public_header_files = '**/template_*.h', '**/per_expand_data.h', '**/str_ref.h'
s.xcconfig = {
Pod::Spec.new do |s|
s.name = 'ctemplate'
s.version = '0.1'
s.summary = 'HTML template for C++.'
s.source = { :git => 'https://github.com/MailCore/mailcore2'}
s.source_files = 'Externals/ctemplate-ios/include/**/*.h'
s.preserve_path = 'Externals/ctemplate-ios', 'scripts'
s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/ctemplate/Externals/ctemplate-ios/lib/"',
# Use GNU C++ standard
'CLANG_CXX_LANGUAGE_STANDARD' => 'gnu++0x',
@dinhvh
dinhvh / gist:5971554
Last active December 19, 2015 14:48
podspec for MailCore 2
Pod::Spec.new do |s|
s.name = 'mailcore2'
s.version = '0.1'
s.summary = 'MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.'
s.homepage = 'http://libmailcore.com'
s.license = { :type => 'BSD', :file => 'COPYRIGHT' }
s.author = 'Hoà V. DINH'
s.source = { :git => 'https://github.com/MailCore/mailcore2'}
s.source_files = 'src/core/**/*.h', 'src/core/**/*.c', 'src/core/**/*.cc', 'src/core/**/*.mm', 'src/core/**/*.m',
'src/async/**/*.h', 'src/async/**/*.c', 'src/async/**/*.cc', 'src/async/**/*.mm', 'src/async/**/*.m',
diff --git a/src/core/basetypes/MCOperationQueue.cc b/src/core/basetypes/MCOperationQueue.cc
index 8dd7a4f..72d0041 100644
--- a/src/core/basetypes/MCOperationQueue.cc
+++ b/src/core/basetypes/MCOperationQueue.cc
@@ -154,6 +154,8 @@ void OperationQueue::stoppedOnMainThread(void * context)
mStarted = false;
release(); // (2)
+
+ release(); // (3)