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:70256354b254cf263907
Last active September 29, 2018 21:46
Startup Design Framework - How to implement Parallax
// Parallax - paste this code in script.js
$('.content-23.custom-bg').each(function() {
if(! isMobile.any())
$(this).parallax('50%', 0.3, true);
else
$(this).css('background-attachment', 'initial');
});
@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 / OSredir.js
Last active July 3, 2017 09:13
Javascript OS client detection with url redirect
/* Zilli 201507
To detect the operating system on the client machine,
match the value of navigator.appVersion,
then redirect to OS url with the location.replace value.
*/
if (navigator.appVersion.match(/Mac/i)) {
location.replace("index-Mac.html");
}
else if (navigator.appVersion.match(/Win/i)) {
@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)