#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
/** | |
* Marlin 3D Printer Firmware | |
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
* | |
* Based on Sprinter and grbl. | |
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
var LINK_TYPE_SD = 'sd_src_no_ratelimit'; | |
var LINK_TYPE_HD = 'hd_src_no_ratelimit'; | |
(function downloadVideo(type) { | |
function getMyObject(doc) { | |
var scriptsCollection = doc.getElementsByTagName("script"); | |
var scripts = []; | |
var regExp = /video_ids/i; | |
for (var i = scriptsCollection.length - 1; i >= 0; i--) { | |
var script = scriptsCollection[i].innerHTML; |
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
<?php | |
class Crypt { | |
private $key; | |
function __construct($key){ | |
$this->setKey($key); | |
} |
# installation | |
brew doctor | |
brew install python | |
pip install virtualenv virtualenvwrapper | |
# Add following to .bash_profile | |
export PATH=/usr/local/bin:/usr/local/mysql/bin:/usr/local/share/python:$PATH:~/bin | |
export WORKON_HOME=$HOME/.virtualenvs |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.