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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); | |
@if $index { | |
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | |
} |
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() { | |
var out = {}; | |
var n; | |
var walk = document.createTreeWalker( | |
document, | |
NodeFilter.SHOW_COMMENT, | |
{ acceptNode: function(n) { return n.nodeValue.substring(1, 7) === './src/'; } }, | |
false | |
); | |
while ((n = walk.nextNode()) !== null) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
background-color: #CE3426; | |
color: white; |
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
<link rel="import" href="../polymer/polymer.html"> | |
<polymer-element name="dfp-ad-unit" attributes="network-id width height ad-unit"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
export default { | |
name: 'geolocation-service', | |
initialize: function(container, app) { | |
app.inject('route', 'geolocationService', 'service:geolocation'); | |
app.inject('controller', 'geolocationService', 'service:geolocation'); | |
} | |
}; |
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
/Users/dstaley/Downloads/Winners of MiCredits Mi 4.zip:$pkzip$1*1*2*0*5c*58*2e6a7cd6*0*36*8*5c*2e6a*e21dd3255fcc6919f64ddadc95ac710d065b7fb96d0e97937a1f253bf92d73fe7a4aa92db7fca1f600c4a8b4e8f3331b0847f2d2f0b73d5665496b68747f4e394c7b7829b81832839cef7da084e564815672a3de59b4b8576d25dc87*$/pkzip$ |
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
func jortSort<T:Comparable>(inout array: [T]) -> Bool { | |
// sort the array | |
let originalArray = array | |
array.sort({$0 < $1}) | |
// compare to see if it was originally sorted | |
for var i = 0; i < originalArray.count; ++i { | |
if originalArray[i] != array[i] { return 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
func fizzbuzz(i: Int) -> String { | |
let result = (i % 3, i % 5) | |
switch result { | |
case (0, _): | |
return "Fizz" | |
case (_, 0): | |
return "Buzz" | |
case (0, 0): | |
return "FizzBuzz" | |
default: |
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
func partition<C: Comparable>(v: C[], left: Int, right: Int) -> Int { | |
var i = left | |
for j in (left + 1)..(right + 1) { | |
if v[j] < v[left] { | |
i++ | |
(v[i], v[j]) = (v[j], v[i]) | |
} | |
} | |
(v[i], v[left]) = (v[left], v[i]) | |
return i |