Skip to content

Instantly share code, notes, and snippets.

View justinoboyle's full-sized avatar
Probably drinking coffee.

Justin O'Boyle justinoboyle

Probably drinking coffee.
View GitHub Profile
const table = $($('table.list')[0])
const rows = $(table.children()[0]).children()
let countRow = 0
let heading = []
let grades = []
for(let row of rows) {
let rowData = {}
let countCol = 0
topD=document.getElementsByClassName('navigation-widget-content')[0];
l=allDescendants(topD, 0);
console.log(l);
copy(l);
console.log("copied to clipboard in markdown format :)");
function allDescendants (node, levels) {
let arr=[];
if(node.childNodes)
for (var i = 0; i < node.childNodes.length; i++) {
@justinoboyle
justinoboyle / extract-strings.py
Created June 18, 2017 02:33
Finds strings in executables, useful for analyzing malware.
#!/usr/bin/env python2
# Finds strings in executables, useful for analyzing malware.
# Usage: cat <filename> | ./extract-strings
import sys
import re
chars = r"A-Za-z0-9/\-:.,_$%'()[\]<> "
shortest_run = 4
// Java has this already, don't bother :)
Array.prototype.peek = function() {
return this[this.length - 1];
}
// Cool, right?
let toClose = o => o.charCodeAt(0) == 40 ? String.fromCharCode(41) : String.fromCharCode(o.charCodeAt(0) + 2);
let toOpen = o => o.charCodeAt(0) == 41 ? String.fromCharCode(40) : String.fromCharCode(o.charCodeAt(0) - 2);
let matches = ['(', '[', '{'],
//META{"name":"StaffPortal"}*//
var StaffPortal = function () {};
StaffPortal.prototype.getName = function() {
return "StaffPortal";
};
StaffPortal.prototype.getDescription = function() {
return "Easier StaffPortal integration!";
};
@justinoboyle
justinoboyle / .babelrc
Last active January 22, 2017 00:03
Simple Node + Babel Boilerplate
{
"presets": ["es2015", "stage-0"]
}
<div class="error error_404 "><div class="text"><h1>500</h1><div class="desc"><h2><span>A server error has occurred</span><span>.</span></h2></div></div><style> .error { color: #000; background: #fff; top: 0; bottom: 0; left: 0; right: 0; position: absolute; font-family: "SF UI Text", "Helvetica Neue", "Lucida Grande"; text-align: center; padding-top: 20%; } .error.error_500 { background: #000; background: #fff; } h1, .desc { display: inline-block; vertical-align: top; } .desc { text-align: left; line-height: 49px; height: 49px; vertical-align: middle; } .shouldRetry .desc { height: 29px; margin-top: -18px; } h1, h2, h3 { margin: 0; padding: 0; font-weight: normal; } h1 { border-right: 1px solid rgba(0, 0, 0,.3); margin-right: 20px; padding: 10px 23px; font-size: 24px; font-weight: 500; } .shouldRetry h1 { padding: 16px 23
Date/Time: 2016-12-30 03:32:34 -0500
OS Version: iPhone OS 10.0.1 (Build 14A403)
Architecture: arm64
Report Version: 19
Command: MobileSMS
Path: /Applications/MobileSMS.app/MobileSMS
Version: 5.0 (1.0)
Parent: launchd [1]
PID: 22536
@justinoboyle
justinoboyle / character-index.html
Last active December 20, 2016 22:27 — forked from Luc-Gibson/character-index.html
Can anyone help me get the rewind and fast forward buttons on this simple jaa audio player to work? It would be great if they could skip 15 seconds backward & forward.
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<style>
.container {
padding: 20px;
padding-bottom: 15;
max-width: 200px;
background-image: url(http://pixelcolony.co.uk/host/audio-widget/bg.png);
"use strict";
// Polyfill for browsers that do not support
String.prototype.replaceAll = function (search, replacement) {
var target = this;
return target.replace(new RegExp(search, 'g'), replacement);
};
$(function () {
const partials = {};