Skip to content

Instantly share code, notes, and snippets.

@tribut
tribut / VirtualBox
Created July 5, 2019 10:02
Workaround for VirtualBox and dark mode themes
#!/bin/sh
# This is a workaround for Virtualbox drawing white text on light background
# when using dark mode, see https://www.virtualbox.org/ticket/18258
exec "$(which -a VirtualBox | grep -v "$(readlink -e "$0")" | head -n1)" -style Fusion "$@"
@Ryan1729
Ryan1729 / notes.md
Last active April 7, 2020 09:53
Theming Git-Gui on windows

As far as i can tell there is no way to change the theme of git-gui as packaged in git for windows without editing .tcl files.

When you use the Git GUI here context menu option, the .tcl files that are interpreted are those in C:\Users\USERNAME\AppData\Local\Programs\Git\mingw64\lib\tk8.6\ttk. You can confirm this with Process Monitor. You'll want to filter for wish.exe if you do so. Oddly enough there is a totally separte copy of these files in Program Files/Git.

Hello world

A .tcl file that git-gui interprets directly is ttk.tcl. To demonstrate that this is the case add the following line ttk.tcl somewhere at the top level.

tk_messageBox -type ok -icon info -message "Hello world" -title "Info"
@YumaInaura
YumaInaura / ZSH.md
Last active April 17, 2022 10:11
Zle — Show all widget list ( $ zle -al )

Zle — Show all widget list ( $ zle -al )

zle widget can be used by zsh command bindkey.

Command

zle -al
@m93a
m93a / Shell_ContextMenu_GitHub.reg
Last active December 26, 2023 05:43
Create neat sub-menus for Windows Explorer directory right-click, one for the Command Line, one for PowerShell and one for Git
Windows Registry Editor Version 5.00
; GitHub Desktop
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuGit\shell\github]
; "Icon"=(REG_EXPAND_SZ)"%LocalAppData%\\GitHubDesktop\\GitHubDesktop.exe"
"Icon"=hex(2):25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\
00,74,00,61,00,25,00,5c,00,47,00,69,00,74,00,48,00,75,00,62,00,44,00,65,00,\
73,00,6b,00,74,00,6f,00,70,00,5c,00,47,00,69,00,74,00,48,00,75,00,62,00,44,\
00,65,00,73,00,6b,00,74,00,6f,00,70,00,2e,00,65,00,78,00,65,00,00,00
@skywind3000
skywind3000 / vimtweak2.vim
Last active June 17, 2023 02:13
Pure python + vimscript implementation of vimtweak (set gvim window transparency on windows)
#include <stdio.h>
@AndrewCarterUK
AndrewCarterUK / phpixie-sockpuppets.md
Last active October 28, 2017 20:29
PHPixie using sockpuppets on /r/php

See this thread here

/u/dracony Based on the previous comments I updated the base auth project to include separate user and admin logins (totaly separate auth domains), added a .gif demo for the lazy ( http://i.imgur.com/WznceCf.gif ) and the ability to impersonate users.

/u/phpgeek Wow, that's actually something I could use.

/u/underdogging10 >>> Just gonna throw this out there... but you seem to always post positively on any PHPixie post shortly after it is posted. Pretty sure this is just /u/dracony. In fact, basically everything you have posted over the last 3 months is just praise of PHPixie.

@yyamasak
yyamasak / reformat.tcl
Created April 19, 2015 06:27
The original code was taken from: Reformat Tcl code indentatioin http://wiki.tcl.tk/15731
proc reformat {tclcode {pad 4}} {
set lines [split $tclcode \n]
set out ""
set continued no
set oddquotes 0
set line [lindex $lines 0]
set indent [expr {([string length $line]-[string length [string trimleft $line \ \t]])/$pad}]
set pad [string repeat " " $pad]
foreach orig $lines {
@JSONOrona
JSONOrona / parser.py
Last active January 4, 2021 16:37
Python command line argument example using argparse module
#!/usr/bin/python
''' Python command line argument example using argparse module
Example output:
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood
Server name: [ pyserver ]
@cosmicscr
cosmicscr / bootstrap_3_full_class_list
Last active June 3, 2023 00:07
bootstrap 3 full class list
Here are all the classes from Bootstrap 3 (version 3.1.1).
Method of extraction:
1. Download Bootstrap 3 and rename bootstrap.css as "bootstrap.html"
2. Add the following 24 lines of code to the very bottom of the bootstrap.html file:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
@scottydelta
scottydelta / imgur.php
Created December 15, 2013 11:37
A php script to upload images to Imgur anonymously using Imguy API V3. The input is an image and Output is a direct ink.
<?php
$client_id = 'xxxxxxxx';
$file = file_get_contents("test-image.png");
$url = 'https://api.imgur.com/3/image.json';
$headers = array("Authorization: Client-ID $client_id");
$pvars = array('image' => base64_encode($file));
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL=> $url,