Skip to content

Instantly share code, notes, and snippets.

@mcflynto
mcflynto / vpnc-script
Created June 30, 2019 21:37 — forked from jscelza/vpnc-script
A custom OpenConnect script to set DNS using `networksetup` on OSX, which makes it work with things that don't read from `/etc/resolv.conf`
#!/bin/sh
#
# Originally part of vpnc source code:
# © 2005-2012 Maurice Massar, Jörg Mayer, Antonio Borneo et al.
# © 2009-2012 David Woodhouse <dwmw2@infradead.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
function fizzBuzz(num) {
for (let i = 1; i <= num; i++) {
if (i % 5 == 0 && i % 3 == 0) {
console.log('FizzBuzz ' + i);
} else if ( i % 5 == 0) {
console.log('Fizz ' + i);
} else if ( i % 3 == 0 ) {
console.log('Buzz ' + i);
}
}
function ceasar(str) {
const charArray = [];
const regEx = /[A-Z]/ ;
str = str.split("");
for (const x in str) {
if (regEx.test(str[x])) {
charArray.push((str[x].charCodeAt() - 65 + 13) % 26 + 65);
} else {
charArray.push(str[x].charCodeAt());
$(".magsymbol").hover(function () {
$(this).addClass("animated infinite pulse");
}, function () {
$(this).removeClass("animated infinite pulse");
});