Skip to content

Instantly share code, notes, and snippets.

View hyphendigital's full-sized avatar
✌️

Hyphen Digital Network hyphendigital

✌️
View GitHub Profile
@hyphendigital
hyphendigital / osxvpnrouting.markdown
Created July 4, 2019 08:33
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
@hyphendigital
hyphendigital / style1.css
Created May 9, 2019 09:28 — forked from gigabeep/style1.css
Fade in and up keyframes animation (plus duration, iteration, timing, delay and fill-mode).
@-webkit-keyframes fadeUp {
0% {
filter: alpha(opacity=0);
opacity: 0;
-webkit-transform: translateY(50%);
-moz-transform: translateY(50%);
-ms-transform: translateY(50%);
-o-transform: translateY(50%);
transform: translateY(50%);
}
@hyphendigital
hyphendigital / jquery-device-detect
Created September 11, 2018 07:29 — forked from dubrod/jquery-device-detect
jQuery Device Detect via User Agent
//touch/mobile detection
if (
navigator.userAgent.match(/Phone/i) ||
navigator.userAgent.match(/DROID/i) ||
navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/) ||
navigator.userAgent.match(/Windows Phone/i) ||
@hyphendigital
hyphendigital / parse.js
Created August 8, 2017 20:15
jquery - Parse JSON with jQuery Example
/********************************** example **************************************/
var base_url = 'http://people.cs.uct.ac.za/~swatermeyer/VulaMobi/';
function example()
{
var response = "";
var form_data = {
username: username,
password: password

itunes have a rss feed of their top songs, I would use this to get the daily top 100. This is the feed you want https://itunes.apple.com/gb/rss/topsongs/limit=100/json and this is the generator https://rss.itunes.apple.com/gb/.

{"feed":{"author":{"name":{"label":"iTunes Store"}, "uri":{"label":"http://www.apple.com/uk/itunes/"}}, "entry":{"im:name":{"label":"Wrecking Ball"}, "im:image":[
{"label":"http://a166.phobos.apple.com/us/r30/Music/v4/7f/c5/85/7fc58500-1dd8-6581-2524-c07870b7defa/886444193757.55x55-70.jpg", "attributes":{"height":"55"}}, 
{"label":"http://a888.phobos.apple.com/us/r30/Music/v4/7f/c5/85/7fc58500-1dd8-6581-2524-c07870b7defa/886444193757.60x60-50.jpg", "attributes":{"height":"60"}}, 
{"label":"http://a231.phobos.apple.com/us/r30/Music/v4/7f/c5/85/7fc58500-1dd8-6581-2524-c07870b7defa/886444193757.170x170-75.jpg", "attributes":{"height":"170"}}], "im:collection":{"im:name":{"label":"Wrecking Ball - Single"}, "link":{"attributes":{"rel":"alternate", "type":"text/html", "href":"https:

#Ionic Publish Android App

This is the process to publish an ionic android app.

  1. Make sure you set/increment the version number in config.xml ie 0.0.3.

  2. Make sure the android platform has been added

Keybase proof

I hereby claim:

  • I am techbillies on github.
  • I am techbillies (https://keybase.io/techbillies) on keybase.
  • I have a public key whose fingerprint is 81FA 02D0 E63F 8CC0 7444 1DF5 6F8A A32C A12F 3F5A

To claim this, I am signing this object:

@hyphendigital
hyphendigital / README.md
Created December 23, 2016 10:50 — forked from cstrelioff/README.md
textmine + lda in python

process corpus for lda

In a blog post I wrote about the python package lda, see here, I used the pre-processed data (included with the lda package) for the example. I have since received many questions regarding the document-term matrix, the titles, and the vocabulary-- where do they come from? This gist will use the textmining package to (hopefully) help answer these types of questions.

@hyphendigital
hyphendigital / autoview-syntax.txt
Created April 14, 2016 08:54 — forked from tranzium/autoview-syntax.txt
TradingView can now become automated trading.
---------- Usage
The syntax created by these parameters is placed in an alert's description on Trading View
to be utilized by the AutoView Chrome Extension.
TradingView: https://www.tradingview.com/
AutoView: https://chrome.google.com/webstore/detail/autoview/okdhadoplaoehmeldlpakhpekjcpljmb
---------- Syntax
<letter>=<value>