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
// ==UserScript== | |
// @name tiki utilities | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function remove() | |
{ | |
window.setTimeout(function() { | |
var productContainer = document.querySelectorAll("[data-view-id='product_list_container']"); |
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
<div class="RuleDefinition"> | |
<select class="rule-selector template" data-oldval=""> | |
<option value="">Select</option> | |
<option value="if">If</option> | |
<option value="operation">Operation</option> | |
<option value="value">Value</option> | |
</select> | |
<select class="condition-operator-selector template" data-oldval=""> | |
<option value="equals">equals</option> | |
<option value="greaterthan">greater than</option> |
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.Concurrent; | |
using System.IO; | |
using System.Threading; | |
namespace ConsoleApp | |
{ | |
public class Logger | |
{ | |
private static Lazy<ConcurrentQueue<string>> _outputLog = new Lazy<ConcurrentQueue<string>>(); |
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
public class SecureRandomGenerator | |
{ | |
readonly RNGCryptoServiceProvider csp; | |
public SecureRandomGenerator() | |
{ | |
csp = new RNGCryptoServiceProvider(); | |
} | |
public int Next(int maxExclusiveValue) |
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
// Node modules | |
var fs = require('fs'), | |
durandalBundler = require('./durandal-bundler'), | |
gulp = require('gulp'), | |
concat = require('gulp-concat'), | |
minifyCSS = require('gulp-minify-css'), | |
runSequence = require('run-sequence'); | |
var outputFolder = './dev/dist', | |
destinationFolder = '../v1/dist'; |
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
var _fs = require('fs'), | |
_path = require('path'), | |
_es = require('event-stream'), | |
_glob = require('glob'), | |
_ = require('lodash')._, | |
_gutil = require('gulp-util'), | |
_rjs = require('gulp-requirejs'), | |
_merge = require('deeply'), | |
_Q = require('q'), | |
_esprima = require('esprima'), |
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 isPublicHoliday(date) { | |
if (!(date instanceof Date)) { | |
return false; | |
} | |
var dayInWeek = { | |
"Sunday": 0, | |
"Monday": 1, | |
"Tuesday": 2, | |
"Wednesday": 3, |
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 KnownColor[] AllColors | |
{ | |
get | |
{ | |
if (_allColors != null) | |
{ | |
return _allColors; | |
} | |
// Get all the values from the KnownColor enumeration. |
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
if (!Object.prototype.watch) { | |
Object.defineProperty(Object.prototype, "watch", { | |
enumerable: false, | |
configurable: true, | |
writable: false, | |
value: function (prop, handler) { | |
var oldval = this[prop], | |
newval = oldval, | |
getter = function () { | |
return newval; |
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
DECLARE @RowCount int | |
DECLARE @Random int | |
SET @RowCount = 0 | |
WHILE @RowCount < 100 | |
BEGIN | |
SELECT @Random = ROUND((10 * RAND()), 0) | |
INSERT INTO dbo.Sample_Table (column_1, column_2) |