Skip to content

Instantly share code, notes, and snippets.

$ ./script/build.py -c D
ninja: Entering directory `out/D'
[1/4] CXX obj/atom/common/api/electron_lib.atom_api_native_image.o
FAILED: ../../vendor/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/atom/common/api/electron_lib.atom_api_native_image.o.d '-DATOM_PRODUCT_NAME="Electron"' '-DATOM_PROJECT_NAME="electron"' -DNODE_WANT_INTERNALS=1 -DNODE_SHARED_MODE -DSK_SUPPORT_LEGACY_GETTOPDEVICE -DGLIB_DISABLE_DEPRECATION_WARNINGS -DV8_USE_EXTERNAL_STARTUP_DATA -DENABLE_PLUGINS -DENABLE_PEPPER_CDMS -DUSE_PROPRIETARY_CODECS -DENABLE_WEBRTC -DNDEBUG -DSK_SUPPORT_LEGACY_BITMAP_CONFIG -DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE -DSK_SUPPORT_LEGACY_N32_NAME -DSK_SUPPORT_LEGACY_SETCONFIG -DSK_IGNORE_ETC1_SUPPORT -DSK_IGNORE_GPU_DITHER -DDISABLE_NACL -DTOOLKIT_VIEWS -DUSE_AURA -DUSE_X11 -DUSE_NSS_CERTS -DUSE_NSS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DDEBUG -DCOMPONENT_BUILD -DGURL_DLL -DSKIA_DLL -DUSING_V8_SHARED -DWEBKIT_DLL -I../.. -I../../chromium_src -I../../vendor/brightray -I../../vend
module ActionDispatch
module Routing
class HashFormatter
attr_reader :result
def initialize
@result = {}
end
def section_title(title); end
@YurySolovyov
YurySolovyov / split_config.rb
Created November 12, 2018 10:36
Split Reentrant A/B Ext.
rails_env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
Split.redis = YAML.load_file(Rails.root.join('config/split.yml')).fetch(rails_env)
Split.configure do |config|
adapter = Split::Persistence::RedisAdapter.with_config(
lookup_by: :params_user_id,
namespace: 'abtesting_participant_id',
expire_seconds: 2_592_000, # 30 days
)
@YurySolovyov
YurySolovyov / Gemfile
Created October 1, 2018 13:08
Gemfile for Rails App with JRuby 9.2
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.0'
gem 'pg_jruby'
gem 'rails', '~> 5.2.1'
gem 'activerecord-jdbcpostgresql-adapter'
@YurySolovyov
YurySolovyov / class-names.cljs
Created July 2, 2017 12:17
class-names for ClojureScript
(defn class-names [& args]
(clojure.string/join " "
(mapv name
(reduce (fn [arr arg]
(cond
(or (string? arg)
(symbol? arg)
(keyword? arg)) (conj arr arg)
(vector? arg) (vec (concat arr arg))
(map? arg) (vec (concat arr
@YurySolovyov
YurySolovyov / main.js
Last active April 24, 2018 17:58
async-ipc API proposal
const ipc = require('async-ipc'); // symmetrical in both main and renderer
const SomeAPI = require('some-api');
// events:
ipc.on('create-new-window', (...args) => {
// create new BrowserWindow(...args);
});
ipc.emit('ready', 'some-important-string', 'other-important-arg');
case
when user.subscriber? subscriber_redirect_path
when user.assistant? assistants_dashboard_index_path
else
end
warning.js:36 Warning: Failed prop type: Invalid prop `dragPosition` of type `boolean` supplied to `QueueListItem`, expected `string`.
    in QueueListItem (created by QueueList)
    in QueueList (created by Queue)
    in Queue (created by PlayingBar)
    in div (created by PlayingBar)
    in div (created by PlayingBar)
    in PlayingBar (created by Header)
    in div (created by Header)
    in header (created by Header)
shopt -s extglob
make clean
BUILD_ROOT=$(pwd)
CONFIGURE_ROOT=$(pwd)/configure
function build_for_platform() {
local dir=$1
local os=$2
local arch=$3
diff --git a/.babelrc b/.babelrc
index 45c1a9f..022b341 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,5 +1,9 @@
{
- "presets": ["es2015", "stage-2", "react"],
+ "presets": [
+ "node6",
+ "stage-2",