Skip to content

Instantly share code, notes, and snippets.

View jonleopard's full-sized avatar
ಠ_ಠ

Jon Leopard jonleopard

ಠ_ಠ
View GitHub Profile
@jonleopard
jonleopard / script_orange_eth0.sh
Last active October 1, 2018 21:36
script_orange_eth0
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
configure
set interfaces ethernet eth0 vif 832 dhcp-options client-option "send vendor-class-identifier "sagem";"
set interfaces ethernet eth0 vif 832 dhcp-options client-option "send user-class "\053FSVDSL_livebox.Internet.softathome.Livebox4";"
set interfaces ethernet eth0 vif 832 dhcp-options client-option "send rfc3118-auth 00:00:00:00:00:00:00:00:00:00:00:1a:09:00:00:05:58:01:03:41:01:0d:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx;"
set interfaces ethernet eth0 vif 832 dhcp-options client-option "request subnet-mask, routers, domain-name-servers, domain-name, broadcast-address, dhcp-lease-time, dhcp-renewal-time, dhcp-rebinding-time, rfc3118-auth;"
set interfaces ethernet eth0 vif 832 egress-qos "0:0 1:0 2:0 3:0 4:0 5:0 6:6 7:0"
@jonleopard
jonleopard / likeDelete.js
Created June 21, 2018 12:36
Twitter Like Delete
// For Broski
// Log into Twitter on the web
// open your Developer Console e.g. Developer -> Developer Tools -> Console
// and paste in this code:
var cnt=1;
var interval = setInterval(clearFavs, 1500);
function clearFavs() {
cnt+=1;
@jonleopard
jonleopard / README.md
Created June 19, 2018 10:25 — forked from DirtyF/README.md
Setup Jekyll on macOS with brew and rbenv - See https://jekyllrb.com/docs/installation/#macOS

Type this into your Terminal.app:

curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/bbac59647ac66016cf443caf7d48c6ae173ae57f/setup-rbenv.sh | bash
@jonleopard
jonleopard / cloudflared
Created May 28, 2018 16:09
cloudflared conf
# Commandline args for cloudflared
CLOUDFLARED_OPTS=--port 53 --upstream https://1.1.1.1/dns-query https://1.0.0.1/dns-query https://2606:4700:4700::1111/dns-query https://2606:4700:4700::1001/dns-query
export const fetchColumns = columns => ({
type: 'FETCH_COLUMNS',
id:
columns,
})
export const addColumn = newColumn => ({
type: 'ADD_COLUMN',
id:
newColumn,
@jonleopard
jonleopard / docker-cleanup-resources.md
Created May 9, 2018 12:30 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jonleopard
jonleopard / update-images.sh
Created May 9, 2018 12:30 — forked from ColinLeverger/update-images.sh
Update all Docker images
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull
@jonleopard
jonleopard / example1.js
Last active May 3, 2018 22:47
async/await
// Basic example, working with an API
async function getData() {
try {
let response = await fetch(`${API_URL}/products`)
let products = await response.json()
console.log(products)
} catch(e) {
console.log(e)
}
}
@jonleopard
jonleopard / Table.js
Last active April 27, 2018 11:35
typeError
import React from 'react';
import { withRouter } from 'react-router-dom';
import { renderChangePercent } from '../../helpers';
import styled from 'styled-components';
import PropTypes from 'prop-types';
const TableContainer = styled.div`
overflow-x: auto;
`;
{
"ecmaVersion": 6,
"libs": [
"browser"
],
"loadEagerly": [
"path/to/your/js/**/*.js"
],