using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
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
WIZARDRY 8 HEX-EDIT | |
By Zyvr (zyvrmaccom) | |
Steps: | |
1.Open your save file (/save/*.sav) with a hex-editor. | |
2.Locate the nick-name of your character. | |
3.The order of characters' attributes in the .sav is L1-R1-L2-R2-L3-R3. | |
Each charater takes 1866 bytes. | |
4.See below for the positions for the attributes. Take the byte which | |
represents the first letter of the nick name as relative byte 0000. |
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 System.Environment | |
import Data.List | |
-- takes first string element of given list of strings | |
first :: [String] -> String | |
first args | |
| null args = error "You must provide a radius" | |
| otherwise = head args | |
-- casts string to double |
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 | |
// Should this data be added? | |
apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique ); | |
// Do something before we add the data | |
do_action( "add_{$meta_type}_meta", $object_id, $meta_key, $_meta_value ); | |
// Do Something after the data has been added | |
do_action( "added_{$meta_type}_meta", $mid, $object_id, $meta_key, $_meta_value ); |
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
$packer = new zip_packer(); | |
if ($file) { | |
$itemid = $file->get_itemid(); | |
$filepath = $file->get_filepath(); | |
$filelist = $file->list_files($packer); | |
$numberoffiles = 0; | |
foreach ($filelist as $f) { | |
if (!$f->is_directory) { | |
$numberoffiles++; | |
} |
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
<html> | |
<body> | |
<div role="main" style=""><span id="maincontent" style=""></span><i class="icon fa fa-file-o fa-fw " aria-hidden="true" title="a/add_file" aria-label="a/add_file"></i> a/add_file<br><i class="icon fa fa-folder-o fa-fw " aria-hidden="true" title="a/create_folder" aria-label="a/create_folder"></i> a/create_folder<br> | |
<i class="icon fa fa-download fa-fw " aria-hidden="true" title="a/download_all" aria-label="a/download_all"></i> a/download_all<br><i class="icon fa fa-question-circle text-info fa-fw " aria-hidden="true" title="a/help" aria-label="a/help"></i> a/help<br> | |
<i | |
class="icon fa fa-sign-out fa-fw " aria-hidden="true" title="a/logout" aria-label="a/logout"></i> a/logout<br> | |
<i class="icon fa fa-refresh fa-fw " aria-hidden="true" title="a/refresh" aria-label="a/refresh"></i> a/refresh<br><i class="icon fa fa-search fa-fw " aria-hidden="true" title="a/search" aria-label="a/search"></i> a/search<br><i class="icon fa fa-cog fa-fw " | |
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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
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
/* | |
* @fileoverview Program to free the content in kindle books as plain HTML. | |
* | |
* This is largely based on reverse engineering kindle cloud app | |
* (https://read.amazon.com) to read book data from webSQL. | |
* | |
* Access to kindle library is required to download this book. | |
*/ | |
// The Kindle Compression Module copied from http://read.amazon.com application |