This file contains hidden or 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
function getCodes (charset, codeLength, codeCount) { | |
var codeList = [], | |
codeListLength = 0, | |
charsetLength = charset.split('').length, | |
codePerCharset = charsetLength / codeLength, | |
collision = 0, | |
i, temp; | |
while (codeListLength < codeCount) { | |
var charsetCopy = charset.slice(0).split(''); |
This file contains hidden or 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
private static function isHierarchyCircular ($hierarchy, $circularIdentifier, $nextIdentifier) { | |
if (!array_key_exists($nextIdentifier, $hierarchy)) { | |
$hierarchy[$nextIdentifier] = array(); | |
} | |
$startHierarchy = $hierarchy[$nextIdentifier]; | |
if (in_array($circularIdentifier, $startHierarchy)) { | |
return true; | |
} |
This file contains hidden or 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
#!/bin/bash | |
# to add a protected file, please open protected_file.txt and append a path into | |
# the file, relative to the project directory. | |
# ======================================== | |
# defaults | |
# ======================================== | |
abort_commit_msg="Aborting commit" |
This file contains hidden or 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
set HIGHPERF= 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c | |
for /f "tokens=2 delims=:(" %%x in ('powercfg.exe -getactivescheme') do set ACTIVE=%%x | |
if /i %ACTIVE%==%HIGHPERF% ( | |
powercfg.exe -s a1841308-3541-4fab-bc81-f71556f20b4a | |
) else ( | |
powercfg.exe -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c | |
) |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Reflection; | |
/* | |
Compiled with | |
C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe /t:exe /out:gm_pdf.exe gm_pdf.cs | |
*/ |
This file contains hidden or 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
#!/bin/bash | |
filename="$1" | |
parameter="$2" | |
if [[ ! -f "$filename" ]]; then | |
echo "Please specify the file" | |
exit 1 | |
fi |
This file contains hidden or 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
; https://autohotkey.com/board/topic/7022-acbattery-status/ | |
ReadInteger( p_address, p_offset, p_size, p_hex=true ) | |
{ | |
value = 0 | |
old_FormatInteger := a_FormatInteger | |
if ( p_hex ) | |
SetFormat, integer, hex | |
else | |
SetFormat, integer, dec |
This file contains hidden or 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/env python3 | |
# -*- coding: utf-8 -*- | |
# http://odelvidyascape.blogspot.com/2016/07/dialogue-transcriptions_3.html | |
# http://vidyascape.no-ip.org/kanboard/?controller=board&action=readonly&token=12bc8837b3e20f675f747fda8fabb18052bb904db415bf88e59cd8416b28 | |
# Requirements: | |
# - Python 3 | |
# - BeautifulSoup4 |
This file contains hidden or 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
#!/bin/bash | |
CURRENT_DIR=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) | |
cd "$CURRENT_DIR" | |
hash gm 2>/dev/null || { | |
echo "Please install GraphicsMagick (Q8 win32 dll) first." | |
echo "Go get it at https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick-binaries/" | |
exit 1 | |
} |
OlderNewer