Skip to content

Instantly share code, notes, and snippets.

@yoshoku
yoshoku / foo.cc
Created April 23, 2022 10:54
console.log with node-addon-api
#include <napi.h>
class Foo : public Napi::ObjectWrap<Foo> {
public:
// ...
Napi::Value foo(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::Function consoleLog = env.Global().Get("console").As<Napi::Object>().Get("log").As<Napi::Function>();
consoleLog.Call({ Napi::String::New(env, "Hello, World.") });
@hadynz
hadynz / .travis.linux.yml
Created May 2, 2017 11:49 — forked from chitoku-k/.travis.linux.yml
ChromeDriver on Travis CI
os: linux
node_js: '7'
sudo: required
env: DISPLAY=':99.0'
dist: trusty
addons:
apt:
sources:
- google-chrome
packages:
@chitoku-k
chitoku-k / .travis.linux.yml
Last active September 2, 2022 06:33
ChromeDriver on Travis CI
os: linux
node_js: '12'
sudo: required
env: DISPLAY=':99.0'
dist: trusty
addons:
apt:
update: true
sources:
- google-chrome
@wrumsby
wrumsby / names.css
Last active February 9, 2022 09:47
CSS naming convention.
/* Base styles */
body {}
p {}
/* .layout-{name} */
.layout-sidebar {}
@cceddie
cceddie / gct-applescript-0.2
Created November 30, 2012 09:05
get Chrome tabs, write to executable bash file
-- gct: get chrome tabs
-- save FRONTMOST WINDOW of Chrome (or safari, but definitely not firefox) tabs into a file
-- optionally (by uncommenting) CLOSE the window
-- modified from http://www.leancrew.com/all-this/2012/10/saving-browser-tab-sets/
-- ------------------------------------------------------------
-- cce
-- 2012 nov- rev 0.2
-- - why do i punish myself with applescript?
--
-- ------------------------------------------------------------