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 jooh = ['image', 'images', 'slideshows', 'sectionFrontImages']; | |
angular.forEach(jooh, function (jo) { | |
if (articleData.hasOwnProperty(jo)) { | |
angular.forEach(articleData[jo], function (image, index) { | |
if(image.crops){ | |
if(image.crops.mediumThreeByTwo440 && image.id) { | |
$scope.imageHolder[image.id] = image.crops.mediumThreeByTwo440.url; | |
} | |
} |
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
# Port forward 80 to 8080 in OS X Yosemite | |
# Add this line to /etc/pf.anchors/<anchor name> | |
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 8080 | |
# Save and test if it has any errors | |
$ sudo pfctl -vnf /etc/pf.anchors/<anchor name> |
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
#!/usr/bin/env python | |
import gspread, tweepy, random, sys | |
CONSUMER_KEY = "TWITTER_CONSUMER_KEY" | |
CONSUMER_SEC = "TWITTER_CONSUMER_SECRET" | |
ACCESS_KEY = "TWITTER_ACCESS_KEY" | |
ACCESS_SEC = "TWITTER_ACCESS_SECRET" | |
GOOGLE_USER = "GOOGLE_USERNAME" | |
GOOGLE_PASS = "GOOGLE_PASSWORD" |
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
/* RIBBON BANNERS */ | |
.ribbon { | |
position: absolute; | |
top: 0; | |
right: 0; | |
} | |
/* reset certain elements (in case of conflicting CSS for classes, links, etc.) */ | |
.ribbon .text, |
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
window.addEventListener('error', function(event) { | |
_gaq.push([ | |
'_trackEvent', | |
'JS Error', | |
event.message, | |
event.filename + ': ' + event.lineno, | |
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
from pylab import * | |
from scipy.stats import * | |
# tilastokeskus 2011 | |
num_adults = 4530e3 | |
# tyottomyyspvrh 2014 * 5 pv / vk * 52 vk | |
basic_income = 32.66*5*52 | |
# tilastokeskus 2011 |
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
this.getMapSize = function() | |
{ | |
var s = 0; | |
for (var i in this.attachedMap) | |
{ | |
s++; | |
} | |
return s; | |
} |
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
curl -s http://mtv3.mobi/section/ajaxGetChatData\?chat_id\=chat_gay | sed 's/<.*>\[[0-9]*\:[0-9]*\]\(.*\)<\/.*>/\1/' | head -1 | php -R 'echo html_entity_decode($argn, ENT_COMPAT | ENT_HTML401, "UTF-8");' | say |
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 (input) { | |
var nums = input.split(''), highest = 0; | |
for(var i = 4; i < nums.length; i++) { | |
var number = parseInt(nums[i-4]) * parseInt(nums[i-3]) * parseInt(nums[i-2]) * parseInt(nums[i-1]) * parseInt(nums[i]); | |
highest = number > highest ? number : highest; | |
} | |
return highest | |
} |
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
#!/usr/bin/env python | |
#coding: utf-8 | |
from BeautifulSoup import BeautifulSoup | |
from urllib2 import urlopen | |
viikonsafkat = {} | |
def haeLista2(): | |
url = 'http://www.amica.fi/paaraide#Ruokalista' |