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
/* | |
* Just a simple javascript cross domain workaround. | |
* The typical <script> hack with a little bit of sugar | |
* Needs a unique value to identify the callback | |
* in the callback stack when the script completes. | |
* The uniqueId is not generated outside because it needs to be passed | |
* as a parameter in the API call | |
* The callback stack is stored in window.crossDomainCallbacks | |
*/ | |
function crossDomainScript(url, uniqueId, callback) { |
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
// Decompiled with JetBrains decompiler | |
// Type: TranslateWox.Main | |
// Assembly: TranslateWox, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
// MVID: 0A51035E-8791-4FC6-8557-D3506E321CD1 | |
// Assembly location: C:\Users\Boris\Documents\WoxTranslation\TranslateWox.dll | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Net; |
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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:system="clr-namespace:System;assembly=mscorlib"> | |
<ResourceDictionary.MergedDictionaries> | |
<ResourceDictionary Source="Base.xaml"></ResourceDictionary> | |
</ResourceDictionary.MergedDictionaries> | |
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> | |
<Setter Property="Background" Value="#1f1d1f"/> | |
<Setter Property="Foreground" Value="#cc1081" /> |
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
#region Blur Handling | |
/* | |
Found on https://github.com/riverar/sample-win10-aeroglass | |
*/ | |
private enum AccentState | |
{ | |
ACCENT_DISABLED = 0, | |
ACCENT_ENABLE_GRADIENT = 1, | |
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2, | |
ACCENT_ENABLE_BLURBEHIND = 3, |
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
var directionsService = new google.maps.DirectionsService(); | |
var renderOptions = { draggable: true }; | |
var directionDisplay = new google.maps.DirectionsRenderer(renderOptions); | |
//set the directions display service to the map | |
directionDisplay.setMap(map); | |
//set the directions display panel | |
//panel is usually just and empty div. | |
//This is where the turn by turn directions appear. |
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
public class LocationUtility { | |
public static boolean areColliding(Location lvalue, Location rvalue) { | |
return lvalue.getX() == rvalue.getX() && lvalue.getY() == rvalue.getY(); | |
} | |
private static void applyDirection(Location loc, int modX, int modY, int sizeX, int sizeY){ | |
Location newLoc = new Location(); | |
if(loc.getX() + modX > sizeX) | |
newLoc.setX(1); | |
else if(loc.getX() + modX < 1) | |
newLoc.setX(sizeX); |
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 | |
:: BatchGotAdmin | |
:------------------------------------- | |
REM --> Check for permissions | |
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( | |
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" | |
) ELSE ( | |
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
) |
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
### | |
# Downloads and parses https://lh.2xlibre.net/locales/ into a | |
# JSON file split into the following fields: | |
# - code: locale code, i.e. 'en_GB' | |
# - suffix: locale code suffix, i.e. 'latin' from 'be_BY' | |
# - name: locale name, i.e. 'English' from 'en_GB' | |
# - country: locale country 'title'lized, i.e. 'United Kingdom' from 'en_GB' | |
# Settings as on where to save the html file and locale file can be found below | |
### |
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
# -*- coding: utf-8 -*- | |
from wox import Wox, WoxAPI | |
import webbrowser | |
class Main(Wox): | |
def query(self, query): | |
results = [] | |
if query[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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<ResourceDictionary.MergedDictionaries> | |
<ResourceDictionary Source="Base.xaml"></ResourceDictionary> | |
</ResourceDictionary.MergedDictionaries> | |
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> | |
<Setter Property="Background" Value="#ffffff"/> | |
<Setter Property="Foreground" Value="#000000" /> | |
</Style> | |
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}"> | |
<Setter Property="Background" Value="#001e4e"></Setter> |
OlderNewer