Skip to content

Instantly share code, notes, and snippets.

View jamesmcallister's full-sized avatar
💭
BRB on gitlab

James McAllister jamesmcallister

💭
BRB on gitlab
View GitHub Profile
@chriscpritchard
chriscpritchard / tutorial.md
Last active September 9, 2024 17:44
Technicolor DWA0120 - Obtain PPPOE Password
  1. Connect to the router via ssh, the username is "engineer" and the password is the access key on the bottom of your router
  2. You will be greeted with something akin to the following:
          |                 |           o             |
          |---  ,---. ,---. |---. ,---. . ,---. ,---. |     ,---. ,---.
          |     |---' |     |   | |   | | |     |   | |     |   | |
          `---' `---' `---' `   ' `   ' ` `---' `---' `---' `---' `
                     N E X T   G E N E R A T I O N   G A T E W A Y
     --------------------------------------------------------------------
    

NG GATEWAY SIGNATURE DRINK

@cassiozen
cassiozen / pixelbook-dev-setup.md
Last active October 22, 2023 12:06 — forked from denolfe/pixelbook-linux-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@joshwcomeau
joshwcomeau / FitText.js
Created December 29, 2017 00:24
FitText port
// @flow
// Reimplementation of the jQuery plugin "FitText"
// https://github.com/davatron5000/FitText.js/blob/master/jquery.fittext.js
import React, { PureComponent } from 'react';
type Props = {
compressor: number,
children: React$Node,
};
const express = require('express');
const app = express();
const puppeteer = require('puppeteer');
const ua = require("useragent");
function isBot(userAgent) {
const agent = ua.is(userAgent);
return !agent.webkit && !agent.opera && !agent.ie &&
!agent.chrome && !agent.safari && !agent.mobile_safari &&
!agent.firefox && !agent.mozilla && !agent.android;
@WebReflection
WebReflection / randommac.sh
Last active March 20, 2018 13:27
Getting free wifi on Linux too
#!/usr/bin/env bash
# @example
# chmod a+x randommac.sh
# ./randommac.sh wlp2s0
# @credits original macOS / osX version via @rem
# https://remysharp.com/2017/05/29/getting-free-wifi
if [ "$1" != "" ]; then
@dengjonathan
dengjonathan / react-redux.jsx
Created December 8, 2016 23:03
React Redux
import React from 'react';
import ReactDOM from 'react-dom';
import {createStore} from 'redux';
import {connect, Provider} from 'react-redux';
/********************************REDUX*****************************************/
//default state
const INITIAL_STATE = {
value: 0
};
@mikroskeem
mikroskeem / Arch Linux btrfs install.md
Last active October 18, 2024 19:52 — forked from artizirk/Arch Linux btrfs install.md
Arch Linux installation on btrfs subvolumes

Arch Linux btrfs install

NOTE: Last update to this gist was on Jun 2, 2018. Most of the things here are out of date (e.g consider using zstd for transparent compression instead of lzo), so do your own research as well. Take care!

0. Prerequisites

  • Plenty of storage - snapshots will take (sort of) a lot of space
  • Latest Arch Linux install iso because those have newer kernels and more bugfixes in btrfs.
  • Have previous experience with installing Arch (like you can install arch with a blind fold).
  • Read everything through
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active October 1, 2024 17:10
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@bjoerge
bjoerge / parse.js
Created March 26, 2015 19:14
Parse CSV into objects with RxJS
const Rx = require('rx');
const csv = require('csv-parse');
const fs = require('fs');
Rx.Node.fromReadableStream(fs.createReadStream('file.csv').pipe(csv()))
.skip(1)
.withLatestFrom(rows.take(1), (row, header) => {
// Map header[i] => row[i]
return row.reduce((rowObj, cell, i) => {
rowObj[header[i]] = cell;