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
contract owned { | |
address public owner; | |
function owned() { | |
owner = msg.sender; | |
} | |
modifier onlyOwner { | |
if (msg.sender != owner) throw; | |
_ |
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
description "slanger" | |
author "hpyhacking <https://yunbi.com>" | |
start on startup | |
stop on shutdown | |
respawn | |
respawn limit unlimited | |
chdir /root |
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
[ 90%] Built target genesis_update | |
[ 90%] Built target get_dev_key | |
[ 91%] Built target witness_node | |
[ 91%] Built target delayed_node | |
[ 92%] Building CXX object programs/js_operation_serializer/CMakeFiles/js_operation_serializer.dir/main.cpp.o | |
In file included from /home/muse/muse/libraries/chain/include/graphene/chain/protocol/types.hpp:38:0, | |
from /home/muse/muse/libraries/chain/include/graphene/chain/protocol/base.hpp:26, | |
from /home/muse/muse/libraries/chain/include/graphene/chain/protocol/operations.hpp:25, |
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
# encoding: utf-8 | |
class TempTask | |
def self.get_shareholders | |
ipo_address = '1LDipoYVWA7UsFzWrrcXUGLnsXWuYaJB9f' | |
raw = get_raw(ipo_address) | |
ipo_result = JSON.parse(raw) | |
txs = ipo_result["txs"].reverse | |
for i in txs | |
out_addrs = [] |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
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
-module(sample). | |
-export([combos/1, combos/2]). | |
combos(1, L) -> [[X] || X <-L]; | |
combos(K, L) when K == length(L) -> [L]; | |
combos(K, [H|T]) -> | |
[[H | Subcombos] || Subcombos <- combos(K-1, T)] | |
++(combos(K, T)). | |
combos(L) -> |
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
NSArray *ma1 = [@[@"a", @"b", @"c"] mutableCopy]; | |
NSArray *ma2 = [@[@"a", @"b", @"c"] mutableCopy]; | |
NSArray *array = @[ma1, ma2]; | |
NSLog(@"orign %@", array); | |
[[array objectAtIndex:0] replaceObjectAtIndex:0 withObject:@"X"]; | |
[[array objectAtIndex:1] replaceObjectAtIndex:2 withObject:@"Y"]; |
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
@format = -> | |
return unless arguments.length | |
str = arguments[0] | |
for i in [1...arguments.length] | |
re = new RegExp('\\{' + (i-1) + '\\}', 'gm') | |
str = str.replace(re, arguments[i]) | |
str |
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
-module(fib). | |
-export([fib/1]). | |
-include_lib("eunit/include/eunit.hrl"). | |
fib(0) -> 1; | |
fib(1) -> 1; | |
fib(N) when N > 1 -> fib(N-1) + fib(N-2). | |
fib_test_() -> | |
[?_assert(fib(0) =:= 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
21,24d20 | |
< | |
< require 'iconv' | |
< | |
< | |
49c45 | |
< converted = Iconv.new('utf-8', enc).iconv(data) | |
--- | |
> converted = data.encode enc |