require_once './EasyRss.class.php';
$rss = EasyRss::create()->
title('GitHub')->
link('http://github.com/')->
description('GitHub is the best place to build software together. Over 4 million people use GitHub to share code.')->
pubDateByTimestamp(time())->
category('IT')->
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/python | |
import getopt | |
import sys | |
from PIL import Image | |
def usage(): | |
print('Usage: monika_decode.py [-v] [FILE]') | |
sys.exit(2) | |
def main(argv): |
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
import java.util.Arrays; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Spliterator; | |
import java.util.concurrent.CopyOnWriteArrayList; | |
import java.util.function.Consumer; | |
import java.util.stream.Collectors; |
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
package com.example.stream; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Comparator; |
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
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.OutputStreamWriter; | |
import java.util.EnumSet; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.parsers.ParserConfigurationException; | |
import org.json.JSONArray; |
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
SELECT classname, COUNT(*) c | |
FROM ( | |
SELECT REGEXP_EXTRACT(content, r'class ([A-Z_$][A-Za-z\d_$]*)') as classname | |
FROM [fh-bigquery:github_extracts.contents_java] | |
HAVING classname IS NOT NULL | |
) | |
GROUP BY 1 | |
ORDER BY 2 DESC | |
LIMIT 500 |
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 saveFile(filename, data) { | |
var blob = new Blob([data], {type:'text/plain'}); | |
var saveLink = document.createElement("a"); | |
saveLink.download = filename; | |
saveLink.innerHTML = "Save file"; | |
var url = window.URL || window.webkitURL || window.mozURL || window.msURL; | |
saveLink.href = url.createObjectURL(blob); | |
saveLink.onclick = destroyClickedElement; | |
saveLink.style.display = "none"; | |
document.body.appendChild(saveLink); |
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 exuaTitle = $('h1').text(); | |
var out = exuaTitle + '\n=================='; | |
$('.list tr').slice(1).each(function(i, e) { | |
var nameRow = $(e).find('a[title]'); | |
var id = nameRow.attr('href').substring(nameRow.attr('href').lastIndexOf('/') + 1); | |
var title = nameRow.attr('title'); | |
var infoRow = $(e).find('td[align=right]'); | |
var md5 = infoRow.find('a').first().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
function saveFile(filename, data) { | |
var blob = new Blob([data], {type:'text/plain'}); | |
var saveLink = document.createElement("a"); | |
saveLink.download = filename; | |
saveLink.innerHTML = "Save file"; | |
if (window.webkitURL != null) { | |
saveLink.href = window.webkitURL.createObjectURL(blob); | |
} else { | |
saveLink.href = window.URL.createObjectURL(blob); | |
saveLink.onclick = destroyClickedElement; |
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
<?php | |
/** | |
* Simple template engine | |
*/ | |
class Template { | |
private static $templatesPath = 'templates/'; | |
private static $cache = array(); | |