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 'mp3info' | |
require 'fileutils' | |
require 'logger' | |
require 'concurrent' | |
require 'pathname' | |
require 'benchmark' | |
require 'timeout' | |
class AudioProcessor | |
FFMPEG_OPTS = { |
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
#include <iostream> | |
class Course { | |
private: | |
double job_grade; | |
double job_factor; | |
double examination_grade; | |
double examination_factor; | |
public: |
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
#include <iostream> | |
#include <cstring> | |
class Vehicle { | |
protected: | |
char number[7]; | |
char type[10]; | |
float daycharge; | |
public: |
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 'mechanize' | |
fb_friends = [] | |
# login | |
agent = Mechanize.new | |
page = agent.get("https://www.facebook.com") | |
next_page = page.form_with(:id => 'login_form') do |form| | |
form.field_with(:id => 'email').value = 'username' | |
form.field_with(:id => 'pass').value = '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
# -*- coding: utf-8 -*- | |
# require 'koala' | |
# Doesn't work | |
# @graph = Koala::Facebook::API.new("your_token") | |
# friends = @graph.get_connections("me", "friends") | |
# puts friends.count | |
# friends.each do |friend| | |
# puts friend |
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
// | |
// AppDelegate.swift | |
// test | |
// | |
// Created by IOANNIS DELIGIANNIS on 1/2/16. | |
// Copyright © 2016 IOANNIS DELIGIANNIS. All rights reserved. | |
// | |
import Cocoa |
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 query() { | |
var | |
total = 0, shown = 0, | |
// HN is done with very unsemantic classes. | |
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), | |
query_list = Array.prototype.slice.call(arguments); | |
// This traverses up the dom stack trying to find a match of a specific class | |
function up_to(node, klass) { | |
if (node.className === klass) { |
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
<%= FBGraph::Canvas.parse_signed_request(your_fb_app_secret_key, params[:signed_request]) %> |
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
{"algorithm"=>"HMAC-SHA256", "issued_at"=>1448879940, "page"=>{"id"=>"1446040439016838", "admin"=>true}, "user"=>{"country"=>"gr", "locale"=>"en_US", "age"=>{"min"=>21}}} |
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
zX-Ji-vkP78db-pNC7tVKGT97Zff92zW5cvAvH1Ini0.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTQ0ODg3OTk0MCwicGFnZSI6eyJpZCI6IjE0NDYwNDA0MzkwMTY4MzgiLCJhZG1pbiI6dHJ1ZX0sInVzZXIiOnsiY291bnRyeSI6ImdyIiwibG9jYWxlIjoiZW5fVVMiLCJhZ2UiOnsibWluIjoyMX19fQ |
NewerOlder