Skip to content

Instantly share code, notes, and snippets.

@alshain
alshain / gist:761851
Created January 1, 2011 17:04
Initial commit by Kai Gohegan
<?php
/**
+-----------------------------------------------+
| XBMC PHP Library - (C) Kai Gohegan, 2010 |
+-----------------------------------------------+
A PHP library for interacting with XBMC using
JSON-RPC and XBMC's HTTP-API. Inspiration was
Test
#include <iostream>
#include <algorithm>
#include <queue>
#include <cmath>
using namespace std;
struct Node{
int x;
int y;
@alshain
alshain / build.xml
Last active December 17, 2015 06:49
<?xml version="1.0"?>
<project default="compile" name="Soot Build File">
<property file="ant.settings"/>
<target name="settings">
<fail
message="Please copy ant.settings.template to ant.settings, and set the variables in it."
unless="jasmin.jar"
/>
</target>
@alshain
alshain / plugin.groovy
Last active August 21, 2018 05:40
IntelliJ LivePlugin inject SQL with custom context in string literals
import com.intellij.ExtensionPoints
import com.intellij.lang.injection.MultiHostInjector
import com.intellij.lang.injection.MultiHostRegistrar
import com.intellij.openapi.extensions.ExtensionPoint
import com.intellij.openapi.extensions.ExtensionPointName
import com.intellij.openapi.extensions.Extensions
import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiClass
import com.intellij.psi.PsiClassObjectAccessExpression
import com.intellij.psi.PsiElement
@alshain
alshain / test
Created August 20, 2018 14:57
Test
test
@alshain
alshain / plugin.groovy
Created August 20, 2018 22:01
LivePlugin: Add actions to navigation bar
import com.intellij.ide.ui.customization.ActionUrl
import com.intellij.ide.ui.customization.CustomActionsSchema
import com.intellij.ide.ui.customization.CustomisedActionGroup
import com.intellij.ide.ui.customization.CustomizableActionGroupProvider
import com.intellij.ide.ui.customization.CustomizableActionGroupProvider.CustomizableActionGroupRegistrar
import com.intellij.openapi.actionSystem.*
import com.intellij.openapi.extensions.Extensions
import static liveplugin.PluginUtil.*
@alshain
alshain / SQL-IN.groovy
Created September 25, 2018 08:37
IntelliJ/DataGrip Data Extractors
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
@alshain
alshain / everything.ahk
Last active April 7, 2019 11:42
AutoHotkey to launch Everything via Ctrl-Win-Enter
; Press Ctrl-Win-Enter to show Everything (also works on NumPad)
; Create file in run `install_startmenu_startup_shortcut.bat` to register the file for the currently running user as a startup item.
; ^ Ctrl
; # Windows key
^#Enter::Run "C:\Program Files\Everything\Everything.exe" -togglewindow
; Hmm, when working on notebook attached to full size keyboard
; Ctrl-Win-Numpad works just fine with only the above key.
; Why do I also need this then for the Desktop computer? What gives?
^#NumpadEnter::Run "C:\Program Files\Everything\Everything.exe" -togglewindow
@alshain
alshain / restart_lcore.ps1
Created December 3, 2018 11:26
Kill and restart "Logitech Gaming Software" when it freezes
Stop-Process -ProcessName LCore
Start-Process "C:\Program Files\Logitech Gaming Software\LCore.exe"