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
export const make = Effect.struct({ | |
ref: SubscriptionRef.make(0), | |
}); | |
export interface Counter extends Effect.Success<typeof make> {} | |
export const Counter = Tag<Counter>(); | |
export const CounterLive = Layer.fromEffect(Counter)(make); | |
export const increment = Effect.serviceWithEffect(Counter, ({ ref }) => | |
ref.update((count) => count + 1) |
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 * as T from "@effect-ts/core/Effect" | |
import * as S from "@effect-ts/core/Effect/Experimental/Stream" | |
import * as L from "@effect-ts/core/Effect/Layer" | |
import * as M from "@effect-ts/core/Effect/Managed" | |
import * as Q from "@effect-ts/core/Effect/Queue" | |
import * as SC from "@effect-ts/core/Effect/Schedule" | |
import { literal, pipe } from "@effect-ts/core/Function" | |
import { tag } from "@effect-ts/core/Has" | |
import * as O from "@effect-ts/core/Option" | |
import type { _A } from "@effect-ts/core/Utils" |
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
;(function($) { | |
var $els = $('.js-vertical-center'); | |
var fns = []; | |
$els.each(function(i, el) { | |
var $el = $(el); | |
fns.push(function() { | |
var elHeight = $el.height(); | |
$el.css({ |
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
============================================ | |
PLATFORM_VERSION_CODENAME=REL | |
PLATFORM_VERSION=4.4.3.2.1.000.000 | |
TARGET_PRODUCT=full_mako | |
TARGET_BUILD_VARIANT=codefirex | |
TARGET_BUILD_TYPE=development | |
TARGET_ARCH=arm | |
TARGET_ARCH_VARIANT=armv7-a-neon | |
TARGET_CPU_VARIANT=krait | |
TARGET_CFX_CLANG_VERSION=3.5 |
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
diff -rupN mutt-1.5.21/globals.h mutt-1.5.21.new/globals.h | |
--- mutt-1.5.21/globals.h 2009-08-26 07:08:52.000000000 +1200 | |
+++ mutt-1.5.21.new/globals.h 2013-10-17 11:10:00.752568935 +1300 | |
@@ -226,6 +226,8 @@ WHERE LIST *UserHeader INITVAL (0); | |
WHERE REGEXP PgpGoodSign; | |
WHERE char *PgpSignAs; | |
WHERE short PgpTimeout; | |
+WHERE char *PgpMimeSignatureFilename; | |
+WHERE char *PgpMimeSignatureDescription; | |
WHERE char *PgpEntryFormat; |
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
# Load dependencies. | |
pmodload 'helper' | |
CURRENT_BG='NONE' | |
SEGMENT_SEPARATOR='' | |
function prompt_paradox_pwd { | |
local pwd="${PWD/#$HOME/~}" | |
if [[ "$pwd" == (#m)[/~] ]]; then |
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
var async = require('async'); | |
function getUserFriends(userName, next) { | |
var s = {} | |
db.users.findOne({name:userName}, foundUser); | |
function foundUser(err, user) { | |
if (err != null) return next(err); | |
s.user = user |
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
var fs = require('fs') | |
var ws = new fs.WriteStream('test.out') | |
ws.write(new Buffer('test')) | |
ws.write(new Buffer([])) | |
ws.end(function () { | |
console.log('end') | |
}) |
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
var vm = require('vm') | |
var EventEmitter = require('events').EventEmitter | |
// ==== | |
/** | |
* Supermitter - A compile-on-the-fly event emitter | |
* | |
* @constructor | |
*/ |
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
function forEachNextTick (obj, fn) { | |
var keys = Object.keys(obj) | |
function next () { | |
var key = keys.pop() | |
if (!key) return | |
fn(obj[key]) | |
process.nextTick(next) |