# Turn off your Vagrant machine
$ vagrant halt
# Comment out this line in Vagrantfile
# config.disksize.size = '30GB'
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
| import express from 'express' | |
| import cluster from 'cluster' | |
| import { cpus } from 'os' | |
| import process from 'process' | |
| const workers = Math.min(Number(process.argv[2]) || 1, cpus().length) | |
| const blockTime = Number(process.argv[3]) | |
| const app = express() | |
| const port = 4000 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # Define ULID_DECODE and ULID_ENCODE which convert a ulid string to a binary and vice versa. | |
| delimiter // | |
| DROP FUNCTION IF EXISTS ULID_DECODE// | |
| CREATE FUNCTION ULID_DECODE (s CHAR(26)) RETURNS BINARY(16) DETERMINISTIC | |
| BEGIN | |
| DECLARE s_base32 CHAR(26); | |
| SET s_base32 = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(UPPER(s), 'J', 'I'), 'K', 'J'), 'M', 'K'), 'N', 'L'), 'P', 'M'), 'Q', 'N'), 'R', 'O'), 'S', 'P'), 'T', 'Q'), 'V', 'R'), 'W', 'S'), 'X', 'T'), 'Y', 'U'), 'Z', 'V'); | |
| RETURN UNHEX(CONCAT(LPAD(CONV(SUBSTRING(s_base32, 1, 2), 32, 16), 2, '0'), LPAD(CONV(SUBSTRING(s_base32, 3, 12), 32, 16), 15, '0'), LPAD(CONV(SUBSTRING(s_base32, 15, 12), 32, 16), 15, '0'))); | |
| END// |
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
| ////////////////////////////////////////////////////// | |
| // In SamplePage.xaml | |
| ////////////////////////////////////////////////////// | |
| <local:Breadcrumbs Height="25" MaxWidth="475" | |
| ItemsSource="{Binding Source={StaticResource sampleBreadcrumbsViewSource}}" | |
| > | |
| <local:Breadcrumbs.ItemTemplate> | |
| <DataTemplate> | |
| <Button VerticalAlignment="Top" Margin="0,0,5,0" |
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
| dispatch_queue_t trail_queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
| dispatch_group_t trail_group = dispatch_group_create(); | |
| NSMutableArray *tasks = [[NSMutableArray alloc] init]; | |
| void (^nextTask)() = ^() { | |
| [tasks removeObjectAtIndex: 0]; | |
| if ([tasks count] > 0) { | |
| void (^task)() = [tasks objectAtIndex: 0]; | |
| task(); | |
| } else { |