Skip to content

Instantly share code, notes, and snippets.

View panagiotisTB's full-sized avatar

Panagiotis Toni Bobolakis panagiotisTB

View GitHub Profile
####################################################################################
# Copyright © 2018 Lisk Foundation
#
# See the LICENSE file at the top-level directory of this distribution
# for licensing information.
#
# Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
# no part of this software, including this file, may be copied, modified,
# propagated, or distributed except according to the terms contained in the
# LICENSE file.
@panagiotisTB
panagiotisTB / auto-ocr-files.scpt
Last active April 24, 2017 10:42
A script to automatically OCR Files in a given Folder (macOS Folder Actions).
on adding folder items to this_folder after receiving these_items
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
set the item_info to info for this_item
set the item_size to size of (info for this_item)
set delay_time to ((item_size / 1024 / 30) as integer)
set file_type to name extension of (info for this_item)
if file_type is equal to "pdf" then
@panagiotisTB
panagiotisTB / firewall.sh
Created March 10, 2017 11:43
#school Script for firewall
#!/bin/bash
# =========================================
# === Part 1: Variablen ===
# =========================================
echo " - Variablen werden gesetzt"
# Argument Variables
arg=$1
@panagiotisTB
panagiotisTB / wp-breadcrumbs.php
Created July 7, 2016 09:57
a custom breadcrumb function for wordpress
<?php
function the_breadcrumb()
{
global $post;
$returnHTMLString = '';
$postTitle = strtoupper(get_the_title());
$space = str_repeat('&nbsp;', 3);
$parent_title = strtoupper(get_the_title($post->post_parent));
$parent_title = str_replace(" ▾","" , $parent_title);
@panagiotisTB
panagiotisTB / mysql-dump-export-import.sh
Created May 4, 2016 12:01
Create MySQL dump and import it to another database
# Export dump as .sql
mysqldump -u [username] -p [database_name] > [dump_name].sql
# Enter database password
# Import dump to new databse
mysql -u [username] -p -h [databse_host] [database_name] < [dump_name].sql
# Enter database password