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
<?php | |
require './vendor/autoload.php'; | |
use Stringy\Stringy; | |
class MyStringy extends Stringy { | |
// http://php.net/manual/en/language.oop5.visibility.php#language.oop5.visibility-other-objects |
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
<?php | |
require './vendor/autoload.php'; | |
use Stringy\Stringy; | |
class MyStringy extends Stringy { | |
public $managedCharsArray; |
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
<?php | |
require './vendor/autoload.php'; | |
use Patchwork\Utf8; | |
use Stringy\Stringy; | |
class MyStringy extends Stringy { | |
public function charsArray() { |
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
' taken from FreeFileSync - www.freefilesync.org | |
set argIn = WScript.Arguments | |
num = argIn.Count | |
if num = 0 then | |
WScript.Echo "Call a Windows batch file (*.cmd, *.bat) without showing the console window" & VbCrLf & VbCrLf &_ | |
"Command line:" & VbCrLf & "WScript HideConsole.vbs MyBatchfile.cmd <command line arguments>" | |
WScript.Quit 1 | |
end if |
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
/* | |
cleaner than hard-coding the desired font size | |
refs: http://api.jquery.com/css/ | |
some use case: | |
all these websites that use *huge* font sizes, | |
painful to read even on a 1920x1080 screen. | |
*/ | |
$('.article-content').css('font-size', '-=2'); |
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
// for more elaborate code, see for instance: | |
// https://github.com/jquery/jquery/blob/master/src/manipulation.js | |
function prepend(target, elem) { | |
target.insertBefore(elem, target.firstChild); | |
} | |
function append(target, elem) { | |
target.appendChild(elem); | |
} |
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
; www.autohotkey.com/board/topic/36239-spotify-global-hotkeys/ | |
; #Win !Alt ^Ctrl +Shift | |
#NoEnv | |
#SingleInstance force | |
DetectHiddenWindows, On | |
IfWinNotExist, ahk_class SpotifyMainWindow | |
Run, %A_AppData%\Spotify\spotify.exe, %A_AppData%\Spotify |
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
@SETLOCAL | |
@SET expr=%* | |
@SET expr=%expr:"=\"% | |
@IF ^%expr:~-1%==^; SET expr=%expr:~0,-1% | |
@php -r "var_dump(%expr%);" | |
::A few examples: | |
::phpdump PHP_OS // "Everything should be made as simple as possible, but not simpler." | |
::phpdump ord("\n") // double quotation marks don't produce errors | |
::phpdump hexdec('ff'); // trailing semicolon should be omitted, yet it is supported for convenience |
OlderNewer