Skip to content

Instantly share code, notes, and snippets.

View johndel's full-sized avatar
🖖

John Deliyiannis johndel

🖖
View GitHub Profile
@johndel
johndel / garmin_playlists.rb
Created November 14, 2024 21:36
A simple ruby script which encodes and normalizes all mp3. Then creates playlists to be written on my garmin watch correctly.
require 'mp3info'
require 'fileutils'
require 'logger'
require 'concurrent'
require 'pathname'
require 'benchmark'
require 'timeout'
class AudioProcessor
FFMPEG_OPTS = {
#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