This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a value (de|en)coder for the github.com/google/uuid UUID type. For best experience, register | |
// mongoRegistry to mongo client instance via options, e.g. | |
// clientOptions := options.Client().SetRegistry(mongoRegistry) | |
// | |
// Only BSON binary subtype 0x04 is supported. | |
// | |
// Use as you please | |
package repository | |
import ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from bs4 import BeautifulSoup | |
import re, getpass, requests, os, sys | |
ACCOUNT_URL = "https://capitadiscovery.co.uk/port/account" | |
SESSION_URL = "https://capitadiscovery.co.uk/port/sessions" | |
LOANS_URL = "https://capitadiscovery.co.uk/port/account/loans" | |
FAKE_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import csv | |
import yaml | |
COMMAND_BOOK_FILE = "plugins/CommandBook/warps.csv" | |
ESSENTIALS_OUTPUT_DIR = "plugins/Essentials/warps/" | |
def convertWarp(oldWarp): | |
name = oldWarp[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Code by @vmironov on Kotlinlang slack. | |
* | |
* This code uses dynamic proxies in Java to make it easier to access inaccessible classes via an accessible representation. | |
*/ | |
inline fun <reified T : Any> createMirror(value: Any) = createMirror(value, T::class.java) | |
fun <T> createMirror(value: Any, clazz: Class<T>): T { | |
val loader = clazz.classLoader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET sublimePath=C:\Program Files\Sublime Text 3\sublime_text.exe | |
SET nvimPath=C:\Ali\neovim-qt\nvim-qt.exe | |
rem add sublime for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%sublimePath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command" /t REG_SZ /v "" /d "%sublimePath% \"%%1\"" /f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gib me all ur credits kthx | |
# - ur pal al | |
import weechat | |
import re | |
from pushbullet.pushbullet import PushBullet | |
SCRIPT_NAME = "weepush" | |
SCRIPT_AUTHOR = "SupaHam <[email protected]>" | |
SCRIPT_VERSION = "1" | |
SCRIPT_LICENSE = "None" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @jkbbwr provided the workaround below where you prefix the trailing s with a number such as 1. | |
* The number preceding the s is a padding, but if it's set to 1, there won't be any padding if your string isn't empty. | |
* This works because a variable cannot start with a number, so Kotlin immediately escapes $ if a number follows. | |
*/ | |
fun main(args: Array<String>) { | |
println(""" | |
|CREATE TABLE IF NOT EXISTS `%1$1s` `%2$1s` `%1$1s` ( | |
| ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.base.Objects; | |
import com.google.common.base.Preconditions; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* https://gist.github.com/SupaHam/dad1db6406596c5f8e4b221ff473831c | |
* | |
* @author SupaHam (https://github.com/SupaHam) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [PackageDev] target_format: plist, ext: tmLanguage | |
--- | |
name: JLog | |
scopeName: text.jlog | |
fileTypes: [log] | |
uuid: 0da65be4-5aac-4b6f-8071-1aadb970b8d3 | |
patterns: | |
- match: '^\[\d{2}:\d{2}:\d{2}\]\s+\[.*\]:' | |
name: comment.line.number-sign.perl.text.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// SupaHam (https://github.com/SupaHam) | |
// Settings in here override those in "Default/Preferences.sublime-settings", | |
// and are overridden in turn by file type specific settings. | |
{ | |
"fade_fold_buttons": false, | |
"translate_tabs_to_spaces": true, | |
"always_show_minimap_viewport": true, |
NewerOlder