Skip to content

Instantly share code, notes, and snippets.

View UnforeseenOcean's full-sized avatar
😠
Contact me directly for copyright issues.

Sean Canned Bean UnforeseenOcean

😠
Contact me directly for copyright issues.
  • Don't Bother LTD.
  • Somewhere Foundry, CA
View GitHub Profile
@UnforeseenOcean
UnforeseenOcean / name.js
Created September 8, 2019 14:59 — forked from tkon99/name.js
Random Name Generator for Javascript
/*
(c) by Thomas Konings
Random Name Generator for Javascript
*/
function capFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function getRandomInt(min, max) {
@UnforeseenOcean
UnforeseenOcean / wget.md
Created September 1, 2019 06:39 — forked from protrolium/wget.md
wget commands

Download Only Certain File Types Using wget -r -A

You can use this under following situations:

  • Download all images from a website
  • Download all videos from a website
  • Download all PDF files from a website

$ wget -r -A.pdf http://url-to-webpage-with-pdfs/

@UnforeseenOcean
UnforeseenOcean / konamiCode.js
Created August 20, 2019 05:32 — forked from nestoralvaro/konamiCode.js
Snippet to detect Konami Code (and then do something)
/******************************************************************************
* This script detects the Konami code
* (Full Konami Code obtained from: http://en.wikipedia.org/wiki/Konami_Code)
* If the Konami code is detected the function called "startUpKonami" is invoked.
* You can do whatever you want on "startUpKonami". Right now this method just:
* - Detachs the Konami code detection (so no further detections can happen).
* - Invokes an external function.
*
* Note: In case the user presses keys like "shift", "caps lock", "Ctrl"...
* the code will have to be reentered from scratch
@UnforeseenOcean
UnforeseenOcean / chrome_39.js
Created May 31, 2019 13:00 — forked from ksol/chrome_39.js
Language detection in javascript
window.navigator.language // -> "fr"
window.navigator.languages // -> ["fr-FR", "fr", "en-US", "en", "es", "de"]
window.navigator.userLanguage // -> undefined
window.navigator.browserLanguage // -> undefined
window.navigator.systemLanguage // -> undefined
<?php
/*
This is an update of https://wordpress.org/plugins/tumblr-importer/ that fixes several issues:
- do not skip posts without title/content
- when importing 1 image import it as a WP type image instead of gallery
- when importing images, import first image as a post's featured image
Plugin Name: Tumblr Importer
Plugin URI: http://wordpress.org/extend/plugins/tumblr-importer/
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
<!DOCTYPE html>
<meta name="robots" content="noindex">
<html><head>
<title>Obfuscated name remapper</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body {
background: white;
color: black;
font-family: "Trebuchet MS",Helvetica,Tahoma,Arial,sans-serif;
#include <Windows.h>
#include <stdio.h>
#include "resource.h"
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
DWORD WINAPI soundThread(LPVOID parameter);
int random();
BOOL endofsound = FALSE;
@UnforeseenOcean
UnforeseenOcean / generator.py
Created July 17, 2016 13:43 — forked from agar3s/generator.py
This script creates a midi file using an image as the source of inspiration
#!/usr/bin/python
import sys
import Image
from midiutil.MidiGenerator import MidiGenerator
from midiutil.TrackGen import LoopingArray
filename = sys.argv[1]
midifilename = filename[0:filename.find('.')]+'.midi'
@UnforeseenOcean
UnforeseenOcean / Erode.java
Created July 1, 2016 04:20 — forked from taboularasa/Erode.java
Open the last saved jpeg image Save it as a new jpeg image with slightly more compression Repeat 600 times
import com.sun.image.codec.jpeg.*;
PImage img;
int numberOfFrames = 600;
void setup()
{
size(1024,768);
}