Skip to content

Instantly share code, notes, and snippets.

View johndel's full-sized avatar
🖖

John Deliyiannis johndel

🖖
View GitHub Profile
#include <iostream>
class Course {
private:
double job_grade;
double job_factor;
double examination_grade;
double examination_factor;
public:
#include <iostream>
#include <cstring>
class Vehicle {
protected:
char number[7];
char type[10];
float daycharge;
public:
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'
# -*- 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
//
// AppDelegate.swift
// test
//
// Created by IOANNIS DELIGIANNIS on 1/2/16.
// Copyright © 2016 IOANNIS DELIGIANNIS. All rights reserved.
//
import Cocoa
@johndel
johndel / hn_seach.js
Created December 2, 2015 10:13 — forked from kristopolous/hn_seach.js
hn job query search
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) {
<%= FBGraph::Canvas.parse_signed_request(your_fb_app_secret_key, params[:signed_request]) %>
{"algorithm"=>"HMAC-SHA256", "issued_at"=>1448879940, "page"=>{"id"=>"1446040439016838", "admin"=>true}, "user"=>{"country"=>"gr", "locale"=>"en_US", "age"=>{"min"=>21}}}
zX-Ji-vkP78db-pNC7tVKGT97Zff92zW5cvAvH1Ini0.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTQ0ODg3OTk0MCwicGFnZSI6eyJpZCI6IjE0NDYwNDA0MzkwMTY4MzgiLCJhZG1pbiI6dHJ1ZX0sInVzZXIiOnsiY291bnRyeSI6ImdyIiwibG9jYWxlIjoiZW5fVVMiLCJhZ2UiOnsibWluIjoyMX19fQ
@johndel
johndel / viva_payment.rb
Created October 27, 2014 16:16
Viva Payment
if Rails.env.production?
@viva_url = "https://www.vivapayments.com"
@rest = RestClient::Resource.new "#{@viva_url}/api/orders", :user => "user_id4", :password => "password"
else
@viva_url = "http://demo.vivapayments.com"
@rest = RestClient::Resource.new "#{@viva_url}/api/orders", :user => "user_id", :password => "password"
end
email = @order.email
phone = @order.phone