Skip to content

Instantly share code, notes, and snippets.

@Zillionx
Zillionx / dabblet.css
Created June 30, 2014 20:13
zilli 20140630
/* zilli 20140630
Test for rebeccapurple on WebKit Nightly Builds http://www.webkit.org
is fully supported, the new colour to remember Rebecca
*/
background: rebeccapurple;
font: 200% helvetica Neue, sans-serif;
color: pink;
@Zillionx
Zillionx / TermColor.applescript
Last active August 29, 2015 14:06
Terminal Color Changing via AppleScript
tell application "Terminal"
activate
do script "ssh -2 root@domain.tld"
-- write user's password
-- write some linux commands to remote server
-- set window
set background color of first window to "black"
set cursor color of first window to "white"
set normal text color of first window to "white"
@Zillionx
Zillionx / After-FilemakerProCustomFunct
Last active August 29, 2015 14:08
After – FileMaker pro custom functions
# Sample Input
After ("jim@aol.com" ; "@" ; 1 ; 0)
After ("aa:bb:cc" ; ":" ; -1 ; 1 )
After ("¶a¶b" ; ¶ ; 1 ; 0)
# Sample Output
aol.com
:cc
a¶b
@Zillionx
Zillionx / Dim-the-rest-when-on-mouseover-div.markdown
Created February 22, 2015 03:01
Dim the rest when on mouseover div
@Zillionx
Zillionx / EmbedBgdAudio.html
Last active August 29, 2015 14:17
Embed html background audio
<audio src="/music/good_enough.mp3" autoplay="autoplay">
If you are reading this, it is because your browser does not support the audio element.
<embed src="/music/good_enough.mp3" width="180" height="90" hidden="true" />
</audio>
@Zillionx
Zillionx / gist:6bf3f2679f0d615cf2cd
Created June 22, 2015 21:14
Startup Design Framework - slide autoscrolling
// paste this code in script.js
function autoScrolling()
{ $('.header-1-sub .control-next').click(); setTimeout("autoScrolling();", 8000 /* 8 secs */ ); }
autoScrolling();
@Zillionx
Zillionx / OSdetect.js
Last active August 29, 2015 14:24
OS client javascript detection
/*
To detect the operating system on the client machine,
analyze the value of navigator.appVersion or navigator.userAgent.
This script sets the variable OSName to reflect the actual client OS.
*/
var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
@Zillionx
Zillionx / OSMobileRedir.js
Last active August 29, 2015 14:24
Javascript OS mobile detection with url redirect
/* Zilli 201102
To detect the OS mobile system on the client device,
match the value of navigator.userAgent,
then redirect to mobile url with the location.replace value.
*/
if (navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
@Zillionx
Zillionx / OSMobileRedir.php
Last active August 29, 2015 14:24
PHP OS mobile detection with url redirect
/* Zilli 201102
To detect the OS mobile system on the client device,
match the value of $_SERVER[‘HTTP_USER_AGENT’],
then redirect to mobile url with the header php function.
*/
<?PHP
function mobileDevice()
{
$type = $_SERVER[‘HTTP_USER_AGENT’];
@Zillionx
Zillionx / show_hide_input.html
Last active September 11, 2015 21:16
How To Show And Hide Input Fields Based On Radio Button Selection
<html>
<!-- http://stackoverflow.com/questions/17621515/how-to-show-and-hide-input-fields-based-on-radio-button-selection -->
<head>
<script type="text/javascript">
function yesnoCheck() {
if (document.getElementById('yesCheck').checked) {
document.getElementById('ifYes').style.visibility = 'visible';
}
else document.getElementById('ifYes').style.visibility = 'hidden';