This file contains hidden or 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
csv = open('coscup.csv') | |
html = open('album.html', 'w') | |
style = 'width:600px;margin-bottom:50px;'; | |
style += 'margin-left:auto;margin-right:auto;' | |
style += 'border: 1px solid #AAA;padding:10px;' | |
style += '-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);' | |
for line in csv.readlines(): | |
if 'Timestamp' in line: | |
continue |
This file contains hidden or 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
package idv.yurenju.google.sample; | |
import com.google.api.client.http.GenericUrl; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.http.json.JsonHttpClient; | |
import com.google.api.client.json.JsonFactory; | |
public class SampleClient extends JsonHttpClient { | |
public static final String DEFAULT_BASE_URL = "https://api.twitter.com/"; |
This file contains hidden or 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
string GetJsonPropertyName(User user) | |
{ | |
Type type = user.GetType(); | |
var objProps = type.GetProperties(); | |
foreach (var prop in user.GetType().GetProperties()) | |
{ | |
var attrs = | |
from attr in Attribute.GetCustomAttributes(prop) | |
where attr is JsonPropertyAttribute | |
select attr; |
This file contains hidden or 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 | |
orig = open('coscup.log') | |
output = open('coscup.txt', 'w') | |
for line in orig.readlines(): | |
hour = (8 + int(line[0:2], 10)) % 24 | |
output.write(str(hour).zfill(2) + line[2:]) | |
orig.close() | |
output.close() |
This file contains hidden or 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 | |
for f in `ls *.svg`; do | |
inkscape -w 128 -f "$f" -e "PNG_DIR/${f%.*}.png" | |
done |
This file contains hidden or 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><title></title></head> | |
<body> | |
<button>click me</button> | |
<script type="text/javascript"> | |
document.querySelector('button').addEventListener('click', function() { | |
new MozActivity({ | |
name: 'save-bookmark', |
This file contains hidden or 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
$ gaiatest --address=localhost:2828 test_gallery.py | |
starting httpd | |
running webserver on http://10.247.27.65:39211/ | |
TEST-START test_gallery.py | |
test_gallery_view (test_gallery.TestGallery) ... ERROR | |
====================================================================== | |
ERROR: test_gallery_view (test_gallery.TestGallery) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): |
This file contains hidden or 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(ssid) { | |
var manager = window.navigator.mozWifiManager; | |
var req = manager.getNetworks(); | |
req.onsuccess = function onScanSuccess() { | |
var networks = req.result; | |
for (var i = 0; i < networks.length; i++) { | |
if (networks[i].ssid === ssid) { | |
manager.associate(networks[i]); | |
} |
This file contains hidden or 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 Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
from gaiatest import GaiaTestCase | |
import time | |
import unittest | |
class TestBrowser(GaiaTestCase): |
This file contains hidden or 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 gaiatest import GaiaTestCase | |
import time | |
import unittest | |
class TestInstallApps(GaiaTestCase): | |
manifests = ['http://pasjans-online.pl/manifest.webapp', | |
'http://moz.galactians.spacemonsters.co.uk/manifest.webapp', | |
'http://app-6-mwa-vc-as-en.jocly.com/jocly.webapp', |