Skip to content

Instantly share code, notes, and snippets.

@timabell
timabell / assoc.ps1
Last active December 6, 2022 15:22
set windows file associations
# https://gist.github.com/timabell/bc90e0808ec1cda173ca09225a16e194
# MIT license
$exts=@(
"csv",
"csproj",
"json",
"log",
"md",
"patch",
"sql",
import QtQuick 2.4
Column {
width: parent.width
height: parent.height
property alias model: columnRepeater.model
Repeater {
id: columnRepeater
@JayKickliter
JayKickliter / compdb.mk
Created February 28, 2018 21:26
Generate 'compile_commands.json' in Makefile
%.compdb_entry: %.c
@echo " {" > $@
@echo " \"command\": \"cc $(CFLAGS) $(CPPFLAGS) -c $<\"," >> $@
@echo " \"directory\": \"$(CURDIR)\"," >> $@
@echo " \"file\": \"$<\"" >> $@
@echo " }," >> $@
COMPDB_ENTRIES = $(addsuffix .compdb_entry, $(basename $(SOURCES)))
compile_commands.json: $(COMPDB_ENTRIES)
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active May 10, 2025 12:29
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@pavelburov
pavelburov / set_command_output_to_variable.bat
Created January 26, 2018 14:10
windows batch (bat, cmd) - How to set command output to variable
for /f %%i in ('application arg0 arg1') do set VARIABLE=%%i
echo %VARIABLE%
@ChemistAion
ChemistAion / Nodes.cpp
Created January 25, 2018 15:02
Prototype of standalone node graph editor for ImGui
// Prototype of standalone node graph editor for ImGui
// Thread: https://github.com/ocornut/imgui/issues/306
//
// This is based on code by:
// @emoon https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// @ocornut https://gist.github.com/ocornut/7e9b3ec566a333d725d4
// @flix01 https://github.com/Flix01/imgui/blob/b248df2df98af13d4b7dbb70c92430afc47a038a/addons/imguinodegrapheditor/imguinodegrapheditor.cpp#L432
#include "Nodes.h"
@AllanZyne
AllanZyne / build_qt.md
Last active December 21, 2020 15:32
Build Qt 5.6 for Windows XP with Qt Webkit (VS 2017)

编译 Qt 5.6.3 Windows XP with Qt Webkit (VS 2017)

准备工具

  • qt 5.6.3 的源码
  • qt webkit 的源码(从 github 上下载 5.6 分支,保存到 qt 源码的目录中)
  • python27
  • ruby24
Basic
=====
[Shift]+[Mod]+[Enter] - launch terminal.
[Mod]+[b] - show/hide bar.
[Mod]+[p] - dmenu for running programs like the x-www-browser.
[Mod]+[Enter] - push acive window from stack to master, or pulls last used window from stack onto master.
[Mod] + [j / k] - focus on next/previous window in current tag.
@danieloneill
danieloneill / OtherComponent.qml
Created November 22, 2017 07:41
Qml Reloading technique
import QtQuick 2.7
Item {
Loader {
id: multilevelLoader
anchors.fill: parent
property string sourceUrl: 'ThirdComponent.qml'
function reload()
{
source = sourceUrl + '?' + loader.counter;
@meskarune
meskarune / vimrc
Last active September 18, 2024 03:24
simple functional vim status line - jellybeans theme colors
" status bar colors
au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta
au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
" Status line
" default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
" Status Line Custom
let g:currentmode={