Skip to content

Instantly share code, notes, and snippets.

View keefo's full-sized avatar
📺

Xu Lian keefo

📺
View GitHub Profile
@keefo
keefo / NSNotificationCenter+ObserverAdditions.h
Created August 21, 2012 15:19
Simplifying NSNotificationCenter block
#import <Foundation/Foundation.h>
@interface NSNotificationCenter (ObserverAdditions)
- (void)registerObserver:(id)observer
forName:(NSString *)name
object:(id)obj
queue:(NSOperationQueue *)queue
usingBlock:(void (^)(NSNotification *))block;
@keefo
keefo / clients.md
Last active December 22, 2015 06:08 — forked from notpushkin/clients.md

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@keefo
keefo / nativescript-development-flow.md
Last active December 27, 2018 18:45 — forked from WendySanarwanto/nativescript-development-flow.md
nativescript-development-flow.md
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = YES
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
APPLE_INTERNAL_DIR = /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
@keefo
keefo / Untitled269.ipynb
Created May 19, 2019 05:31 — forked from tonyfast/Untitled269.ipynb
Encrypt answers into a notebook to make testing widgets.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keefo
keefo / php.vim
Created June 8, 2019 04:05 — forked from tmcw/php.vim
" Vim syntax file
" Language: PHP 4/5
" Maintainer: Peter Hodge <toomuchphp-vim@yahoo.com>
" Last Change: May 7, 2008
"
" URL: http://www.vim.org/scripts/script.php?script_id=1571
" Version: 0.9.7
"
" ================================================================
"
@keefo
keefo / image_blink_sincircle.vhdl
Created June 8, 2019 04:06 — forked from ruhatch/image_blink_sincircle.vhdl
Output from 'image_blink_sincircle'
# clash (for make/vhdl/Image/Image.manifest)
# clash (for make/vhdl/Image/Image.manifest)
Loading dependencies took 2.047838812s
Applied 287 transformations
Normalisation took 0.364243634s
Netlist generation took 0.012578591s
Testbench generation took 0.000280213s
Total compilation took 2.428932468s
# vivado (for make/logo.synth.dcp)
@keefo
keefo / Reset-Alias.ps1
Created June 8, 2019 04:09 — forked from Jaykul/Reset-Alias.ps1
Set all the default Windows PowerShell aliases, in a powerful, flexible, way.
<#
.SYNOPSIS
Resets all the default PowerShell 5 aliases.
.NOTES
This script must be run by dot-sourcing if you want it to clear the defaul aliases.
It can take quite a while when it's validating all of the commands (a minute and a half, on my system), so it is by far fastest to run it in -Force
.EXAMPLE
Reset-Alias.ps1 -Force -Quiet
commit a44375a9a7f3ba29eee194b1665ea5cb04724537
Author: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Date: Wed Jan 3 15:41:02 2018 +0100
logging: Break out alternative logging sinks into a well defined API
First steps towards a public API for having multiple output sinks is
to allow this internally.
We give all the different log sinks the same signature, with a bool
diff --git i/src/corelib/kernel/qcoreapplication.cpp w/src/corelib/kernel/qcoreapplication.cpp
index 553eaf0..247d2ad 100644
--- i/src/corelib/kernel/qcoreapplication.cpp
+++ w/src/corelib/kernel/qcoreapplication.cpp
@@ -144,8 +144,13 @@ QString QCoreApplicationPrivate::macMenuBarName()
return bundleName;
}
#endif
+
+static QBasicMutex appNameMutex;