Skip to content

Instantly share code, notes, and snippets.

View pcnate's full-sized avatar

Nathan Baker pcnate

View GitHub Profile
{
"devices": [
{
"device-id": "ACR06D5#5&3860ede5&1&UID4355_3840_1080_{00000000-0000-0000-0000-000000000000}",
"active-zoneset": {
"uuid": "{5C8257EC-92E7-43F9-B1B6-3536B93E28E9}",
"type": "custom"
},
"editor-show-spacing": false,
"editor-spacing": 0,
@pcnate
pcnate / hyper.js
Created May 6, 2019 13:36
hyper 3.0.0 settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@pcnate
pcnate / app.module.ts
Last active February 10, 2019 21:05
basic socket service for angular 6 and 7
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { SocketService } from './_services';
@NgModule({
declarations: [],
imports: [
BrowserModule,
@pcnate
pcnate / speed test
Created December 5, 2018 19:07
flatten an array of objects with a property that contains an array
const arr = [
{ sub: [ 1001, 1002, 1003, 1004, 1005 ] },
{ sub: [ 2001, 2002, 2003, 2004, 2005 ] },
{ sub: [ 3001, 3002, 3003, 3004, 3005 ] },
{ sub: [ 4001, 4002, 4003, 4004, 4005 ] },
{ sub: [ 5001, 5002, 5003, 5004, 5005 ] },
];
const startDates = [];
@pcnate
pcnate / keymaps
Created August 21, 2018 13:40
hyper.is keymaps
keymaps: {
"tab:next": "ctrl+pageup",
"tab:prev": "ctrl+pagedown",
"pane:next": "ctrl+tab",
"pane:prev": "ctrl+shift+tab"
},
@pcnate
pcnate / apt-get output
Last active August 7, 2018 00:53
system76-driver 20180802
pcnate@pop-os:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
apt-config-icons apt-config-icons-hidpi apt-config-icons-large
apt-config-icons-large-hidpi
The following packages will be upgraded:
amd64-microcode atom gnome-shell-extension-pop-battery-icon-fix google-chrome-stable
#Returns the sum of num1 and num2#
def add(num1, num2):
return num1 + num2
def sub(num1, num2):
return num1 - num2
def mul(num1, num2):
return num1 * num2
'body':
'ctrl-shift-pagedown': 'pane:move-item-right'
'ctrl-shift-pageup': 'pane:move-item-left'
'atom-workspace atom-text-editor:not([mini])':
'ctrl-shift-down': 'editor:move-line-down'
'ctrl-shift-up': 'editor:move-line-up'
# requires https://atom.io/packages/multi-cursor
'atom-workspace atom-text-editor:not([mini])':
# you may have to unset the keybinding if it's already in use.
# Expand current cursor
'alt-shift-down': 'multi-cursor:expandDown'
@pcnate
pcnate / gist:e299709dc19c6b681993
Created June 15, 2015 17:04
remove all items in download tab that have been removed
$(".status:contains('Removed')")
.closest("div.download")
.find("a.remove").click()