Skip to content

Instantly share code, notes, and snippets.

@piouc
piouc / SequentialUploader.js
Created September 25, 2014 05:59
SequentialUploader.js
function SequentialUploader(url, name){
// local vars
var files = [];
var uploading = false;
// public method
this.add = function(file, options){
console.log('new file');
files.push({
@piouc
piouc / build-firefox.sh
Last active August 14, 2016 07:03
build-firefox.sh
#!/bin/bash
VERSION=$1
$TEMPDIR
curl -v http://ftp.mozilla.org/pub/firefox/releases/$VERSION/source/firefox-$VERSION.source.tar.xz -O /tmp/
tar -xf /tmp/firefox-$VERSION.source.tar.xz -C /tmp
cd /tmp/firefox-$VERSION/
@piouc
piouc / noFlashNicoVideo.js
Last active November 12, 2016 08:07
noFlashNicoVideo
(() => {
// Remove flash player notify
const notifyOverlay = document.querySelector('.notify_update_flash_player')
if(notifyOverlay){
document.body.removeChild(notifyOverlay)
}
const videoID = JSON.parse(document.getElementById('watchAPIDataContainer').innerHTML).flashvars.videoId
const playerContainer = document.getElementById('playerContainerWrapper')
@piouc
piouc / randomAsciiString.js
Last active February 15, 2017 10:23
randomString
function randomAsciiStrings(length){
return [...Array(length)].map(() => String.fromCharCode(0x20 + Math.random() * 0x5F | 0)).join('')
}
@piouc
piouc / gist:abdf864c94ad91c47296180ff8b9e044
Created February 18, 2017 06:47
Mac black boot screen
sudo nvram 4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14:DefaultBackgroundColor=%00%00%00
[
"cached",
"error",
"abort",
"load",
"beforeunload",
"unload",
"online",
"offline",
"focus",
@piouc
piouc / Basic.terminal
Created August 29, 2017 15:16
Basic.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKyxYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMZHSQoVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NHMCAwIDAgMUYwIDAg
MAAQAYACgAbTFBUNFhcYVE5TSURVTlNJQ0MQB4ADgAXSGg0bHFdOUy5kYXRhTxEMSAAA
class DateTime {
constructor(){
this._year = null
this._month = null
this._date = null
this._hours = null
this._minutes = null
this._seconds = null
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>こころ|夏目漱石</title>
<style>
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
@piouc
piouc / userChrome.css
Created August 8, 2018 00:15
userChrome.css
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url(chrome://browser/content/browser.xul) {
:root {
--toolbarbutton-inner-padding: 2px !important;
--chrome-background-color: #e8e8e8 !important;
--chrome-secondary-background-color: #fff !important;
--focus-ring-box-shadow: none !important;
--toolbarbutton-hover-background: ;
--toolbarbutton-border-radius: 0 !important;
--tab-loading-fill: #808080 !important;