Skip to content

Instantly share code, notes, and snippets.

View zakkak's full-sized avatar
:octocat:
Gitting

Foivos zakkak

:octocat:
Gitting
View GitHub Profile
@zakkak
zakkak / greek2utf8.rb
Created September 29, 2014 00:16
Text encoding converter (suitable for subtitles)
#!/usr/bin/env ruby
################################################################################
# #
# File: greek2utf8.rb #
# ++++++++++++++++++++++++++++++ #
# Copyright (C) 2012 + Author: Foivos S. Zakkak + #
# + Website: foivos.zakkak.net + #
# + Email: foivos@zakkak.net + #
# ++++++++++++++++++++++++++++++ #
@zakkak
zakkak / round_knights.c
Created September 29, 2014 00:16
Knights of the Round Table
/******************************************************************************
* *
* File: round_knights.c *
* *
* This program solves the knights of the round table math problem with some *
* bitwise logic *
* *
* For details about the problem *
* http://mathforum.org/library/drmath/view/55862.html *
* *
@zakkak
zakkak / svnkomb.rb
Created September 29, 2014 00:19
svnKomp (using Kompare for svndiff)
#!/usr/bin/env ruby
################################################################################
# #
# File: svnkomp.rb #
# ++++++++++++++++++++++++++++++ #
# Copyright (C) 2012 + Author: Foivos S. Zakkak + #
# + Website: foivos.zakkak.net + #
# + Email: foivos@zakkak.net + #
# ++++++++++++++++++++++++++++++ #
@zakkak
zakkak / backup_settings.sh
Created September 29, 2014 00:21
A Sync/BackUp script
#!/bin/bash
#########################################################################
# #
# File: backup_settings.sh A sync/backup script #
# #
# ++++++++++++++++++++++++++++++ #
# Copyright (C) 2013 + Author: Foivos S. Zakkak + #
# + Website: foivos.zakkak.net + #
# + Email: foivos@zakkak.net + #
# Maintainer: Foivos S. Zakkak <foivos at zakkak dot net>
pkgname=gnome-shell-extension-workspace-grid
pkgver=1.3.2.r0.geab164c
pkgrel=1
pkgdesc="Allows to configure your workspaces in a grid"
arch=('i686' 'x86_64')
url="https://github.com/zakkak/workspace-grid-gnome-shell-extension"
license=('unknown')
depends=('gnome-shell')
@zakkak
zakkak / installkernel
Last active November 13, 2015 07:10
installkernel
#!/bin/sh
#
# Arguments:
# $1 - kernel version
# $2 - kernel image file
# $3 - kernel map file
# $4 - default install path (blank if root directory)
# define input variables
#
@zakkak
zakkak / SSHFS
Last active December 10, 2015 21:08
Notes on how to add an sshfs folder to fstab
/etc/fstab
==========
`sshfs#myname@www.myhome.com:/home/myname /mnt/sshfs/homebox fuse comment=sshfs,noauto,users,exec,workaround=rename,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,BatchMode=yes 0 0`
/etc/fuse.conf
==============
`user_allow_other`
umount
======
Run `curl -w "@curl-timing.cfg" -o /dev/null -s http://foivos.zakkak.net` where `curl-timing.cfg` contains:
```
\n
DNS lookup : %{time_namelookup}\n
Connect to server (TCP) : %{time_connect}\n
Connect to server (HTTP/S) : %{time_appconnect}\n
Time from start until transfer began: %{time_pretransfer}\n
Time for redirection (if any) : %{time_redirect}\n
Total time before transfer started : %{time_starttransfer}\n
/******************************************************************************
* *
* File: hanoi_towers.c *
* *
* This program solves the Towers of Hanoi puzzle recursively *
* *
* For details about that weird \033 staff visit *
* www.linuxdoc.org/HOWTO/Bash-Prompt-HOWTO/c327.html *
* *
* Compile: *
@zakkak
zakkak / spark-hadoop-troubleshooting.md
Last active December 18, 2016 23:49
Spark and Hadoop Troubleshooting

java.io.IOException All datanodes are bad

Make sure ulimit -n is set to a high enough number (currently, experimenting with 1000000)

To do so check/edit /etc/security/limits.conf.

java.lang.IllegalArgumentException: Self-suppression not permitted

You can ignore this kind of exceptions