Skip to content

Instantly share code, notes, and snippets.

View Melonbwead's full-sized avatar
ʕ̡̢̡*✪௰✪ૢʔ̢̡̢ Caffeine~!

Melon Melonbwead

ʕ̡̢̡*✪௰✪ૢʔ̢̡̢ Caffeine~!
  • ꒰•̥̥̥̥̥̥̥ ﹏ •̥̥̥̥̥̥̥̥๑꒱
  • Verse
View GitHub Profile
@Melonbwead
Melonbwead / mobileDev.js
Last active December 16, 2015 20:39
Useful Snippets for Mobile Web Development. Any comments or suggestions will be greatly appreciated.
/////////////////////////////////////////////////////////////////////////////////////////////////
// USERAGENT SNIFFING / MOBILE BROWSER DETECTION
/////////////////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
$("html").addClass("iosmobile");
}
if(navigator.userAgent.match(/Android/i)){
$("html").addClass("android");
@Melonbwead
Melonbwead / sublime-settings.js
Last active December 18, 2015 09:59
My Sublime Settings.
{
"auto_match_enabled": false,
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme",
"copy_with_empty_selection": false,
"drag_text": false,
"draw_minimap_border": true,
@Melonbwead
Melonbwead / .zshrc
Last active March 23, 2017 09:21
.zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
export PIVOTAL_TOKEN=''
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
/**
* Aquarium
*
* Author: ronnycarr@gmail.com
* Date: 2014-03-22
*/
// for the UI
metadata {
@meepoSenpai
meepoSenpai / .Xresources
Created March 20, 2015 21:37
XResources
urxvt*termName: rxvt
urxvt*background: rgba:2000/2000/2000/ddff
urxvt*depth: 32
urxvt*foreground: #949494
urxvt*scrollBar: false
urxvt*matcher.button: 1
urxvt*cursorBlink: true
urxvt*cursorColor: #c1c8c9
urxvt*colorBD: #9a7b88
@avafloww
avafloww / PhpJava.java
Last active June 13, 2024 07:36
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.