Skip to content

Instantly share code, notes, and snippets.

View bright-spark's full-sized avatar
♥️
Tinkering with stuff!

Myburgh bright-spark

♥️
Tinkering with stuff!
View GitHub Profile
@bright-spark
bright-spark / browser-detect.js
Created September 29, 2018 23:31 — forked from devfred/browser-detect.js
javascript: Browser Detection
(function( undefined ){
/* Apple Device Webkit Browsers */
var isIdevice = /(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent);
if (isIdevice){
document.getElementsByTagName('body')[0].className += ' iphone ipod ipad';
}
var isIphone = /(iPhone).*AppleWebKit/i.test(navigator.userAgent);
if (isIphone){
document.getElementsByTagName('body')[0].className += ' iphone';
@bright-spark
bright-spark / browser_detect.js
Created September 29, 2018 23:30 — forked from 2107/browser_detect.js
JavaScript: Detect Browser
// browser detect
var BrowserDetect = {
init: function() {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function(data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;

New Computer Setup

Last tested using Mac OS X 10.8 Mountain Lion

Before Wiping Original Install

  • Backup .ssh folder to avoid having to regenerate codes for services such as Heroku and Github.
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline

Ionic Ion: Tinder Cards ('-' * 23) An Ion (reusable Ionic widget) for adding tinder-style swipe cards to your app.

A Pen by Ionic on CodePen.

License.

@bright-spark
bright-spark / WebViewDemoPage.cs
Created May 8, 2016 10:29 — forked from jgold6/WebViewDemoPage.cs
WebViewDemoPage.cs
using System;
using Xamarin.Forms;
namespace FormsGallery
{
public class WebViewDemoPage : ContentPage
{
@bright-spark
bright-spark / jquery-chker.htm
Created May 8, 2016 07:51 — forked from ianchanning/jquery-chker.htm
jQuery timer function
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>chker</title>
<link type="text/css" href="style.css" rel="stylesheet" />
</head>
<body>
<div id="chker" class="chker">
@bright-spark
bright-spark / s3.sh
Created April 10, 2016 00:07 — forked from chrismdp/s3.sh
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@bright-spark
bright-spark / replace_apt_sources.sh
Created April 9, 2016 20:29 — forked from eculver/replace_apt_sources.sh
Replace default Ubuntu apt repository URLs w/ DigitalOcean's
sudo sed -i "s/archive\.ubuntu/mirrors.digitalocean/g" /etc/apt/sources.list
@bright-spark
bright-spark / codiqa.html
Created March 18, 2016 09:06 — forked from mlynch/codiqa.html
Codiqa Responsive Features
<div class="container">
<h2>Also included in every plan</h2>
<div class="row">
<div class="col-6 col-lg-3">
<h4>Team Collaboration</h4>
</div>
<div class="col-6 col-lg-3">
<h4>Live Preview</h4>
</div>
<div class="col-6 col-lg-3">