Skip to content

Instantly share code, notes, and snippets.

View keefo's full-sized avatar
🎯
Indulging in the future of software engineering

Xu Lian keefo

🎯
Indulging in the future of software engineering
View GitHub Profile
;; From: http://www.emacswiki.org/emacs/ImenuMode
;; Overview
;; Imenu produces menus for accessing locations in documents, typically in the current buffer.
;; You can access the locations using an ordinary menu (menu bar or other) or using minibuffer completion.
;; A typical use of Imenu shows a menu-bar menu that is an index or table of contents for the current buffer.
;; For a source-code buffer it is typical to index definitions of functions, variables, and so on.
@keefo
keefo / Program.fs
Created June 8, 2019 04:12 — forked from ctaggart/Program.fs
SourceLink.SymbolStore example
open System
open System.IO
open SourceLink
open SourceLink.SymbolStore
open System.Reflection
let printfn format = Printf.ksprintf (fun message -> System.Diagnostics.Debug.WriteLine message) format
let pdbFcs = @"..\..\packages\FSharp.Compiler.Service.0.0.76\lib\net45\FSharp.Compiler.Service.pdb"
let dllFcs = @"..\..\packages\FSharp.Compiler.Service.0.0.76\lib\net45\FSharp.Compiler.Service.dll"
@keefo
keefo / data_types.exs
Created June 8, 2019 04:11 — forked from alvanieto/data_types.md
[Elixir] Elixir snippets #elixir
keyword_list = [eins: 1, zwei: "dos"]
map = %{eins: 1, zwei: "dos"}
map.zwei
map2 = %{:eins => 1, :zwei => "dos"}
map2.zwei
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;
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
@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
@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 / 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
"
" ================================================================
"
# function to calculate the volume of a sphere
function sphere_vol(r)
# julia allows Unicode names (in UTF-8 encoding)
# so either "pi" or the symbol π can be used
return 4/3*pi*r^3
end
# functions can also be defined more succinctly
quadratic(a, sqr_term, b) = (-b + sqr_term) / 2a
@keefo
keefo / AppController.j
Created June 8, 2019 04:01
Objective-J example
@import <Foundation/CPObject.j>
@import <Foundation/CPNotificationCenter.j>
@import <Foundation/CPURL.j>
@import <AppKit/CPToolbar.j>
@import <AppKit/CPCursor.j>
@import "CKToolbarDelegate.j"
@import "CKGitHubController.j"
@import "CKGistController.j"
@import "CKMainView.j"