Skip to content

Instantly share code, notes, and snippets.

Avatar

Blake Winton bwinton

View GitHub Profile
View part2.rs
// This only works if your offset is bigger than half the length of your data…
fn run_big_fft(data: &[char], iterations: usize, offset: usize) -> String {
let mut curr: Vec<i32> = data
.iter()
.skip(offset)
.map(|&i| i.to_digit(10).unwrap() as i32)
.collect();
for _ in 0..iterations {
let mut next: Vec<i32> = vec![];
let mut sum: i32 = curr.iter().sum();
View q02.rs
//-----------------------------------------------------
// Setup.
static INPUT: &str = include_str!("data/q02.data");
fn run_tape(ints: &mut Vec<usize>) -> usize {
let mut position = 0;
loop {
let opcode = &ints[position];
match opcode {
View gist:18f62ad444fa2df5a42803e95535d5f5
The locale requested by LC_CTYPE=en_CA.UTF-8 isn't available here.
Running `locale-gen en_CA.UTF-8' may be necessary.
The locale requested by LC_CTYPE=en_CA.UTF-8 isn't available here.
Running `locale-gen en_CA.UTF-8' may be necessary.
mosh-server needs a UTF-8 native locale to run.
Unfortunately, the local environment (LC_CTYPE=en_CA.UTF-8) specifies
the character set "US-ASCII",
View disable.diff
diff --git a/browser/components/touchbar/MacTouchBar.js b/browser/components/touchbar/MacTouchBar.js
--- a/browser/components/touchbar/MacTouchBar.js
+++ b/browser/components/touchbar/MacTouchBar.js
@@ -288,13 +288,16 @@ class TouchBarHelper {
this.activeUrl = data;
if (data.startsWith("about:reader")) {
kBuiltInInputs.ReaderView.disabled = false;
- this._updateTouchBarInput("ReaderView");
} else {
// ReaderView button is disabled on every location change since
@bwinton
bwinton / user-style.css
Created Apr 26, 2018
LimeChat-ish styles for irccloud
View user-style.css
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-track-piece {
background-color: transparent !important;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
}
div#sidebarwrapper:hover ::-webkit-scrollbar-thumb,
View 1 - New failures
0:20.60 TEST_END: MainThread ERROR, expected PASS
Traceback (most recent call last):
File "c:\Users\bwinton\Programming\mozilla-central\testing/marionette/harness\marionette_harness\marionette_test\testcases.py", line 188, in run
self.tearDown()
File "c:\Users\bwinton\Programming\mozilla-central\testing\firefox-ui\tests\functional\sessionstore\test_tabbar_session_restore_button.py", line 54, in tearDown
super(TestBaseTabbarSessionRestoreButton, self).tearDown()
File "c:\Users\bwinton\Programming\mozilla-central\testing/marionette/puppeteer/firefox\firefox_puppeteer\mixins.py", line 100, in tearDown
self._check_and_fix_leaked_handles()
File "c:\Users\bwinton\Programming\mozilla-central\testing/marionette/puppeteer/firefox\firefox_puppeteer\mixins.py", line 60, in _check_and_fix_leaked_handles
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
@bwinton
bwinton / merged log
Last active Jun 20, 2017
session restore failures.
View merged log
{"source": "Firefox UI - functional Tests", "thread": "MainThread", "time": 1497987321100, "action": "log", "message": "Using workspace for temporary data: \"c:\\Users\\bwinton\\Programming\\mozilla-central\"", "level": "INFO", "pid": 6636}
{"source": "Marionette test runner", "thread": "MainThread", "time": 1497987321114, "action": "log", "message": "Application command: c:/Users/bwinton/Programming/mozilla-central/obj-i686-pc-mingw32\\dist\\bin\\firefox.exe -no-remote -marionette -profile c:\\users\\bwinton\\appdata\\local\\temp\\tmptagjos.mozrunner", "level": "INFO", "pid": 6636}
1497987324374 Marionette INFO Listening on port 2828
1497987324730 Marionette DEBUG Accepted connection 0 from 127.0.0.1:54027
{"source": "Firefox UI - functional Tests", "thread": "MainThread", "time": 1497987324733, "action": "log", "message": "Profile path is c:\\users\\bwinton\\appdata\\local\\temp\\tmptagjos.mozrunner", "level": "INFO", "pid": 6636}
{"source": "Firefox UI - functional Tests", "thread": "MainThread", "time": 1
@bwinton
bwinton / tofino-windows.log
Created Apr 6, 2017
Problems running Tofino on Windows.
View tofino-windows.log
> BFGBrowser@1.0.0 dev+logging C:\Users\bwinton\Programming\tofino
> cross-env NODE_ENV=development LOGGING=on gulp build+start --obj-dir-name development
[10:54:49] Requiring external module babel-register
[10:54:52] Using gulpfile ~\Programming\tofino\gulpfile.babel.js
[10:54:52] Starting 'build+start'...
[10:54:52] Starting 'build'...
[10:54:52] Starting 'build:write-build-type'...
[10:54:52] Creating build-type
@bwinton
bwinton / simple-keyboard.lua
Last active Apr 7, 2017
FooIRC Simple Keyboard Shortcuts.
View simple-keyboard.lua
/*
This Action Group implements keyboard shortcuts for Foo IRC.
The following keyboard shortcuts are provided:
Switch to the previous server in the IRC View (default: Shift+S)
Switch to the next server in the IRC View (default: Shift+W)
Switch to previous channel or view on the current server (default: Shift+A)
Switch to next channel or view on the current server (default: Shift+D)
Clears the messages of the currently open private message, channel, or server console view (default: Shift+C)
@bwinton
bwinton / web-extrun.log
Created Jan 4, 2017
web-ext run errors
View web-extrun.log
> web-ext run -s dist --firefox=firefoxdeveloperedition
Running web extension from c:\Users\bwint\Programming\addons\SnoozeTabs\dist
Running Firefox with profile at C:\Users\bwint\AppData\Local\Temp\a6df52f7-0cc2-44a1-a365-d0a3fc9c4187
(node:3972) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
run: TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:468:7)
at c:\Users\bwint\Programming\addons\SnoozeTabs\node_modules\fx-runner\lib\utils.js:86:20
You can’t perform that action at this time.