This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function encryptMessage(message, keyword) { | |
var cipher = []; | |
var alpha = 'abcdefghigklmnopqrstuvwxyz'.split(''); | |
var alphaLength = alpha.length; | |
//split input | |
var message = message.split(''); | |
var keyword = keyword.split(''); | |
//config for key position | |
var keyIndex = 0; | |
var keyLength = keyword.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function encode(message){ | |
var rail1=[]; | |
var rail2=[]; | |
var rail3=[]; | |
var message = message.split(' ').join(''); | |
console.log(message) | |
for( var i = 0; i < message.length; i++ ){ | |
if(i % 4 == 0 ){ | |
rail1.push( message[i] ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var array = ["enlists", "google", "inlets", "banana"]; | |
function anagram(word, array) { | |
var word = word.split('').sort().join(''); | |
for(var i = 0; i < array.length; i++) { | |
var checking = (array[i].split('').sort().join('')); | |
word === checking ? console.log(array[i], true) : false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function id() { | |
return Math.random().toString(16).substring(2, 10); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function frame(){ | |
$.fillStyle = "hsla(0,5%,5%,1)"; | |
$.fillRect(0, 0, w, h); | |
$.fillStyle = "hsla(" + (ŭ % 360) + ",100%,50%,1)"; | |
$.globalAlpha = .8; | |
var gravX = msX; | |
var gravY = msY; | |
var f = first; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Manually emulate ionic/cordova application | |
echo "Emulating..." | |
cd ./platforms/ios/build/emulator | |
var=$(pwd) | |
ios-sim launch "$var"/*.app | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MutationObserver = window.WebKitMutationObserver; | |
var observer = new MutationObserver(function(mutations, observer) { | |
console.log(mutations, observer); | |
foo() | |
}); | |
observer.observe(document, { | |
subtree: true, | |
childList: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
/** | |
* @desc directive for ghostwriter | |
* @example <ghost-writer></ghost-writer> | |
*/ | |
angular | |
.module('starter') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//execute my jquery script in chrome tabs; | |
//execute my content script in the chorme tabs; | |
chrome.tabs.executeScript({ file: "jquery.min.js" }, function() { | |
chrome.tabs.executeScript({ file: "scripts/content.js" }); | |
}); | |
//when a new chrome tab is created run my function; | |
chrome.tabs.onCreated.addListener(function(tabId, changeInfo, tab) { | |
refeshScript(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'sinatra/reloader' | |
require 'omniauth-twitter' | |
configure do | |
enable :sessions | |
user OmniAuth::Builder do | |
provider :twitter, ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET'] | |
end | |
end |
OlderNewer