Skip to content

Instantly share code, notes, and snippets.

View the-eater's full-sized avatar
🤔
Trying to ship sunken software

eater the-eater

🤔
Trying to ship sunken software
View GitHub Profile
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active November 25, 2024 13:50
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
anonymous
anonymous / imgurbar.user.js
Created February 20, 2015 21:08
Imgur vote bar
// ==UserScript==
// @name Imgur vote bar
// @namespace http://www.jaswin.net
// @description Adds the vote bar back to imgur
//
// @include *imgur.com/gallery/*
//
// @version 1.0
// @require http://code.jquery.com/jquery-1.11.0.min.js
// @grant None
anonymous
anonymous / DOM tree in console
Created April 3, 2013 08:38
just a little script that messes around with the console.group and builds the DOM tree in the console
(function(d,c){
(function(a){
for(var i = 0;i<a.length;i++){
var d = a[i],e = d.childNodes;
if(e != undefined && e.length > 0){
c.group(d.nodeName);
arguments.callee(e);
c.groupEnd();
}else{
c.log(d.nodeName);
@adeelejaz
adeelejaz / jquery.browser.js
Last active January 9, 2018 18:15
jQuery $.browser as a separate file in case you do not want to include the full migration file
(function( jQuery, window, undefined ) {
"use strict";
var matched, browser;
jQuery.uaMatch = function( ua ) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
@L-four
L-four / extsubs.py
Created October 16, 2012 11:27
Basic script for extracting SSA/ASS subs from mkv(matroska) and converting them to webvtt
#!/usr/bin/env python3
import sys
import os
import re
import subprocess
def get_files_subs(file):
file = file.rstrip('\n')
qfile = quote(file)
@dblock
dblock / getWeek.js
Created July 13, 2011 22:49
get week of the year in JavaScript
function( d ) {
// Create a copy of this date object
var target = new Date(d.valueOf());
// ISO week date weeks start on monday
// so correct the day number
var dayNr = (d.getDay() + 6) % 7;
// Set the target to the thursday of this week so the