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
DROP TYPE IF EXISTS tmp_events_op CASCADE; | |
CREATE TYPE tmp_events_op AS ENUM ('create', 'update', 'delete'); | |
DROP TABLE IF EXISTS tmp_events; | |
CREATE TEMPORARY TABLE tmp_events | |
( | |
id SERIAL PRIMARY KEY, | |
op tmp_events_op NOT NULL, | |
name text NOT NULL, | |
value text NOT NULL |
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
//Your action before | |
export const query = dispatch => { | |
dispatch("MYTYPE_START"); | |
myAPI.query() | |
.then(resp => dispatch("MYTYPE_SUCCESS", resp)) | |
.catch(err => dispatch("MYTYPE_ERROR", err); | |
} | |
//Your action after | |
export const query = () => ({ |
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
/* | |
[License] | |
MIT | |
[Purpose] | |
Also lets you verify the result content is valid or else it keeps retrying. | |
[Sample Usage] | |
getJsWithRetries("path/to/some.js", resp => resp.length === 100) | |
.then(() => { |
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
@echo off | |
SET st3Path=C:\Stuff\Dropbox\Tools\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
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 dgram = require( "dgram" ), | |
fs = require("fs"), | |
_ = require("lodash"); | |
exports.query = query; | |
var packet = { | |
initialChallenge: "FE" + "FD" + "09", | |
base: "FE" + "FD" + "00", |
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 ($) { | |
$.fn.fillheight = function () { | |
return this.each(function () { | |
$(this) | |
.height("100%") | |
.parent().wrapInner("<table style='height:100%;width:100%;margin:0;padding:0;border:0;'/>").end() | |
.siblings().wrapAll("<tr><td style='padding:0;'></td></tr>").end() | |
.wrap("<tr><td style='height:100%;padding:0;'></td></tr>"); | |
}); | |
}; |
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.Linq; | |
using System.Text; | |
using NUnit.Framework; | |
namespace TaxAyende | |
{ | |
internal class Program | |
{ |