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
// based on https://github.com/tmikov/hermes-jsi-demos/blob/master/hello/hello.cpp | |
// Intl calls from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat | |
#include <hermes/hermes.h> | |
#include <iostream> | |
/// JS code to be executed. | |
static const char *code = R"( | |
const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738)); | |
print('Expected output: "12/20/2020"') |
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
console.time('load') | |
const isObject = require('lodash.isobject') | |
const isEmpty = require('lodash.isempty') | |
const dark_colorblind = { | |
canvasDefaultTransparent: 'var(--bgColor-transparent, var(--color-canvas-default-transparent, rgba(13,17,23,0)))', | |
pageHeaderBg: 'var(--page-header-bgColor, var(--color-page-header-bg, #0d1117))', | |
marketingIcon: { | |
primary: 'var(--color-marketing-icon-primary, #79c0ff)', |
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
class ComponentStatusMigratorGenerator < Thor::Group | |
include Thor::Actions | |
# Define arguments and options | |
argument :name | |
class_option :status, default: "alpha", desc: "Status of the component. One of alpha, beta or stable" | |
def self.source_root | |
File.dirname(__FILE__) | |
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
# frozen_string_literal: true | |
require "benchmark" | |
require_relative "lib/primer/classify/utilities" | |
require_relative "lib/primer/classify/utilities_old" | |
# make sure YML is loaded | |
Primer::Classify::Utilities::UTILITIES | |
Primer::Classify::UtilitiesOld::UTILITIES |
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
# frozen_string_literal: true | |
require 'httparty' | |
REQUESTED_BUILDS = ARGV[0].to_i || 10 | |
SPEC_FILES = {} | |
def get(url, options = {}) | |
headers = { | |
'cache-control': 'no-cache', |