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
on escapeString(toEscape) | |
set res to replaceChars(toEscape, "\"", """) | |
set res to replaceChars(res, "'", "'") | |
set res to replaceChars(res, "&", "&") | |
set res to replaceChars(res, ">", ">") | |
set res to replaceChars(res, "<", "<") | |
return res | |
end escapeString | |
on replaceChars(this_text, search_string, replacement_string) |
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
on cmdTab() | |
tell application "System Events" | |
key down command | |
keystroke tab | |
key up command | |
end tell | |
end cmdTab |
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
(defn partial-right | |
"Takes a function f and fewer than the normal arguments to f, and | |
returns a fn that takes a variable number of additional args. When | |
called, the returned function calls f with additional args + args." | |
([f] f) | |
([f arg1] | |
(fn [& args] (apply f (concat args [arg1])))) | |
([f arg1 arg2] | |
(fn [& args] (apply f (concat args [arg1 arg2])))) | |
([f arg1 arg2 arg3] |
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
(ns crmui-reagent.core | |
(:require | |
[cljsjs.material-ui] | |
[cljs-react-material-ui.core :as ui] | |
[cljs-react-material-ui.reagent :as rui] | |
[cljs-react-material-ui.icons :as ic] | |
[reagent.core :as r :refer [atom]] | |
[reagent.session :as session] | |
[secretary.core :as secretary :include-macros true] | |
[accountant.core :as accountant] |
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
pragma solidity ^0.4.1; | |
import "strings.sol"; | |
contract SimpleTwitter { | |
using strings for *; | |
address public developer; | |
uint16 public maxTweetLength; | |
uint16 public maxNameLength; |
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
(reg-event-fx | |
:blockchain/unlock-account | |
interceptors | |
(fn [{:keys [db]} [address password]] | |
{:web3-fx.blockchain/fns | |
{:web3 (:web3 db) | |
:fns [[web3-personal/unlock-account address password 999999 | |
:blockchain/account-unlocked | |
:log-error]]}})) |
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
(reg-event-fx | |
:contract/fetch-compiled-code | |
interceptors | |
(fn [{:keys [db]} [on-success]] | |
{:http-xhrio {:method :get | |
:uri (gstring/format "/contracts/build/%s.json" | |
(get-in db [:contract :name])) | |
:timeout 6000 | |
:response-format (ajax/json-response-format {:keywords? true}) | |
:on-success on-success |
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
(reg-event-fx | |
:initialize | |
(fn [_ _] | |
(merge | |
{:db db/default-db | |
:dispatch [:contract/fetch-compiled-code [:contract/compiled-code-loaded]]} | |
(when (:provides-web3? db/default-db) | |
{:web3-fx.blockchain/fns | |
{:web3 (:web3 db/default-db) | |
:fns [[web3-eth/accounts :blockchain/my-addresses-loaded :log-error]]}})))) |
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
(reg-event-fx | |
:initialize | |
(fn [_ _] | |
(merge | |
{:db db/default-db | |
:dispatch [:contract/fetch-compiled-code [:contract/compiled-code-loaded]]} | |
(when (:provides-web3? db/default-db) | |
{:web3-fx.blockchain/fns | |
{:web3 (:web3 db/default-db) | |
:fns [[web3-eth/accounts :blockchain/my-addresses-loaded :log-error]]}})))) |
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
(reg-event-fx | |
:initialize | |
(fn [_ _] | |
(merge | |
{:db db/default-db | |
:http-xhrio {:method :get | |
:uri (gstring/format "/contracts/build/%s.abi" | |
(get-in db/default-db [:contract :name])) | |
:timeout 6000 | |
:response-format (ajax/json-response-format {:keywords? true}) |
OlderNewer