Skip to content

Instantly share code, notes, and snippets.

Avatar

Antal Orcsik aorcsik

View GitHub Profile
@aorcsik
aorcsik / tmetric-charts.user.js
Last active May 20, 2017
TMetric - Projects Summary Chart - Tampermonkey Script
View tmetric-charts.user.js
// ==UserScript==
// @name TMetric Charts
// @namespace http://aorcsik.com/
// @version 0.1
// @description Add animated bars to Projects Summary tables
// @author Antal Orcsik (http://aorcsik.com/)
// @match https://app.tmetric.com/*
// @grant none
// ==/UserScript==
@aorcsik
aorcsik / string-truncate.swift
Last active Sep 27, 2017
A little truncate function extension for the default String type
View string-truncate.swift
extension String {
/// Truncates the string to length number of characters and
/// appends optional trailing string if longer
func truncate(length: Int, trailing: String? = nil) -> String {
if countElements(self) > length {
return self.substringToIndex(advance(self.startIndex, length)) + (trailing ?? "")
} else {
return self
}
}
View af-magic2.zsh-theme
# af-magic2.zsh-theme
#
# Author: Antal Orcsik
# URL: http://aorcsik.com/
# Direct Link: https://gist.githubusercontent.com/aorcsik/c749f90bed0f885c4d0d/raw/af-magic2.zsh-theme
# Based on: Andy Fleming's af-magic theme
#
# Created on: July 17, 2014
# Last modified on: July 17, 2014
View keybase.md

Keybase proof

I hereby claim:

  • I am aorcsik on github.
  • I am aorcsik (https://keybase.io/aorcsik) on keybase.
  • I have a public key whose fingerprint is D38D 74D3 79AA C164 6D28 0110 F11A 6066 8362 3EF3

To claim this, I am signing this object:

@aorcsik
aorcsik / gist:5011587
Last active Dec 14, 2015 — forked from gklka/gist:5011530
This is an augmented version of a small script from @gklka for correcting the beszeljukmac.com RSS.
View gist:5011587
<?php
if (isset($_GET['url'])) {
$url = $_GET['url'];
} else {
$url = "http://beszeljukmac.com/index.php/rss/hirek";
}
$page = file_get_contents($url);
if (function_exists("mb_convert_encoding")) {
@aorcsik
aorcsik / final_code.js
Created Sep 23, 2012
HTML5 Notifications
View final_code.js
document.write('<input id="shownoti" style="display: none;" type="button" value="Show Notification" />');
document.write('<div style="display: none;" id="notidenied">Az értesítések megjelenítését letiltottad!</div>');
var displayNotiButton = function() {
if (window.webkitNotifications.checkPermission() == 0) {
document.getElementById("shownoti").onclick = function() {
var notification = webkitNotifications.createNotification("icon.png", "blog.intiweb.hu", "Értesítve vagy!");
notification.addEventListener('display', function() {
window.setTimeout(function() {
notification.cancel();
}, 5000);