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 / 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 / ios.md
Last active February 9, 2022 02:14
OSX-Setup

iOS setup

Hello

  • Disable Location Services
  • Passcode Options -> Don't Add Passcode
  • SetUp as New iPad
  • Turn off iClound Drive
  • Turn On Siri Later
  • Don't Send
@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 / gist:abdf864c94ad91c47296180ff8b9e044
Created February 18, 2017 06:47
Mac black boot screen
sudo nvram 4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14:DefaultBackgroundColor=%00%00%00
@piouc
piouc / nicovideo_fake_premium.user.js
Created April 22, 2017 17:58
nicovideo fake premium
// ==UserScript==
// @name nicovideo fake premium
// @namespace org.kamisama.nicovideo-fake-premium
// @include http://www.nicovideo.jp/watch/sm*
// @version 1
// @grant none
// @run-at document-start
// ==/UserScript==
/*
[
"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
}