Skip to content

Instantly share code, notes, and snippets.

Jason Williams jasonwilliams

Block or report user

Report or block jasonwilliams

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e233ea3e93b19441c3de24fc7af611f4
logs_stats=# \d messages
Table "public.messages"
Column | Type | Modifiers
------------+--------------------------+-------------------------------------------------------
id | integer | not null default nextval('messages_id_seq'::regclass)
user | integer | not null
content | text |
action | action |
timestamp | timestamp with time zone | default now()
channel_id | integer |
View lighthouse.js
function generateReport(site, data, type) {
let promise = new Promise((resolve, reject) => {
launchChromeAndRunLighthouse(v.url, {output: type})
.then((data) => {
data = JSON.stringify(data);
// timestamep will be used on the filename
let timeStamp = DateTime.local().toISODate();
// Directory may not exist yet
if (!fs.existsSync(`reports/${v.name}`)) {
View gulpfile.js
'use strict';
const fs = require('fs');
const s3 = require('gulp-s3-upload')();
const log = require('lighthouse-logger');
const gulp = require('gulp');
const config = require('config');
const DateTime = require('luxon').DateTime;
const lighthouse = require('lighthouse');
@jasonwilliams
jasonwilliams / gist:2bcc9286fd52518ec4317b33482a1500
Created Jan 25, 2018
`VAGRANT_LOG=info vagrant up` | port forwarding = true
View gist:2bcc9286fd52518ec4317b33482a1500
==> default: Configuring and enabling network interfaces...
INFO ssh: SSH is ready!
INFO ssh: Execute: (sudo=false)
INFO guest: Execute capability: configure_networks [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, [{:type=>:static, :adapter_ip=>"192.168.193.1", :ip=>"192.168.193.22", :netmask=>"255.255.255.0", :auto_config=>true, :interface=>0}]] (redhat)
INFO ssh: SSH is ready!
INFO ssh: Execute: (sudo=false)
INFO guest: Execute capability: network_scripts_dir [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (redhat)
INFO ssh: SSH is ready!
INFO ssh: Execute: (sudo=false)
INFO guest: Execute capability: network_interfaces [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (redhat)
@jasonwilliams
jasonwilliams / gist:4b9c52a0e97072694cb0e2764c12a8d6
Created Jan 25, 2018
VAGRANT_LOG=info vagrant up | portfowarding false
View gist:4b9c52a0e97072694cb0e2764c12a8d6
==> default: Configuring and enabling network interfaces...
INFO ssh: SSH is ready!
INFO ssh: Execute: (sudo=false)
INFO guest: Execute capability: configure_networks [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, [{:type=>:static, :adapter_ip=>"192.168.193.1", :ip=>"192.168.193.22", :netmask=>"255.255.255.0", :auto_config=>true, :interface=>0}]] (redhat)
INFO ssh: SSH is ready!
INFO ssh: Execute: (sudo=false)
INFO guest: Execute capability: network_scripts_dir [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (redhat)
INFO ssh: SSH is ready!
INFO ssh: Execute: (sudo=false)
@jasonwilliams
jasonwilliams / gist:b535be2b51ebb4b61a3f4a53a6a5dabd
Created Mar 15, 2018
Building Servo (after 1 day from git pull)
View gist:b535be2b51ebb4b61a3f4a53a6a5dabd
λ .\mach.bat build -d
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Updating git repository `https://github.com/servo/webrender`
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading gleam v0.4.24
Downloading mozjs v0.2.0
@jasonwilliams
jasonwilliams / gist:b0013c94f116780a7ee64f2dffd6299d
Created Mar 19, 2018
build (dev) 19th march 2008 (MacOS 10.12.6 (16G1212)) Sierra
View gist:b0013c94f116780a7ee64f2dffd6299d
./mach build -d
Downloading gl_generator v0.9.0
Downloading khronos_api v2.1.0
Downloading image v0.18.0
Downloading cc v1.0.5
Downloading syn v0.12.12
Downloading synstructure v0.7.0
Downloading quote v0.4.2
Downloading unicode-xid v0.1.0
@jasonwilliams
jasonwilliams / gist:f4bcb9d4d0647d906098637ea2c3e1c6
Created Mar 19, 2018
single line of code added in servo/lib.rs
View gist:f4bcb9d4d0647d906098637ea2c3e1c6
./mach build -d
Compiling libservo v0.0.1 (file:///Users/willij87/workspace/servo/components/servo)
Compiling servo v0.0.1 (file:///Users/willij87/workspace/servo/ports/servo)
Finished dev [unoptimized + debuginfo] target(s) in 101.81 secs
[Warning] Could not generate notification! Optional Python module 'pyobjc' is not installed.
Build Completed in 0:01:46
@jasonwilliams
jasonwilliams / gist:9d27cc98f2cc4d7501ab3d019d99d70e
Created Mar 19, 2018
Fresh build with C:\Users\jasew\.cargo and C:\Users\jasew\.rustup excluded from Windows Defender
View gist:9d27cc98f2cc4d7501ab3d019d99d70e
λ .\mach.bat build -d
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Installing missing MSVC dependencies...
Downloading https://servo-deps.s3.amazonaws.com/msvc-deps/ninja-1.7.1.zip ...
Downloading ninja-1.7.1: 100.0%
Extracting ninja-1.7.1...done
View gist:b1a9a9c010cbcb310f16819df274624c
plugins loaded
GoSublime r18.03.16-1: gs.init()
GoSublime r18.03.16-1: sh.init()
GoSublime r18.03.16-1 sh: using shell env GOPATH=C:\Users\jasew\workspace\go
GoSublime r18.03.16-1 sh: using shell env GOROOT=C:\Go
GoSublime r18.03.16-1 sh: using shell env PATH=C:\Go\bin;C:\Users\jasew\workspace\go\bin;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Yarn\bin\;C:\Users\jasew\.cargo\bin;C:\Users\jasew\AppData\Local\Microsoft\WindowsApps;C:\Python27\Scripts;C:\Python27;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64;C:\Program Files (x86)\GnuWin32\bin;C:\Users\jasew\AppData\Roaming\npm;C:\Program Files\nodejs;C:\Program Files\Microsof
You can’t perform that action at this time.