Skip to content

Instantly share code, notes, and snippets.

View allanlaal's full-sized avatar

Allan Laal allanlaal

View GitHub Profile
@nkmathew
nkmathew / youtube-watchlater-button.user.js
Last active December 13, 2021 18:30
Tampermonkey script that adds a navigation button for getting to your watch later playlist easily
// ==UserScript==
// @name Youtube WatchLater Button
// @namespace http://nkmathew.net
// @version 0.2.0
// @description Adds a button for getting to your watch later playlist easily
// @icon http://youtube.com/favicon.ico
// @icon64 http://youtube.com/favicon.ico
// @author nkmathew
// @match https://www.youtube.com/*
// @grant none
@dufferzafar
dufferzafar / design-time-tracker.md
Last active March 15, 2023 00:19
Design of an open source, cross platform, time tracking application.

Time Tracker

Build a Manic Time alternative.

The application would be in two parts:

  • a tracker agent that dumps data into some backend
    • should be dumb and not do much processing of the data
  • a reporting dashboard which will show various timelines, statistics etc.
@avih
avih / equalizer.lua
Last active May 16, 2024 18:53
Visual equalizer script for mpv
--[[
mpv 5-bands equalizer with visual feedback.
Copyright 2016 Avi Halachmi ( https://github.com/avih )
License: public domain
Default config:
- Enter/exit equilizer keys mode: ctrl+e
- Equalizer keys: 2/w control bass ... 6/y control treble, and middles in between
- Toggle equalizer without changing its values: ctrl+E (ctrl+shift+e)
@platan
platan / maximize_all.sh
Created January 12, 2015 16:10
Maximize all windows from command line in linux (via wmctrl)
#!/bin/bash
window_ids=$(wmctrl -l | cut -f1 -d " ")
for window_id in $window_ids
do
wmctrl -i -r "$window_id" -b add,maximized_vert,maximized_horz
done
@tbusser
tbusser / tabs-vs-spaces.md
Created November 11, 2014 10:17
Tabs vs spaces

It is my opinion that tabs are better than spaces, especially when working in a team. Why you aks? When using tabs everyone has the ability to indent the code according to their own preference. If your teams decides on using spaces you also need to agree on how many spaces to use for an indent. Do you pick 2 spaces, 4 spaces or something else? Odds are, someone is not going to be happy with the team's decision.

Using tabs gives everyone the freedom to indent the code to their own liking. Most editors have an option to specify how many columns a tab should indent. This allows each team member to pick the setting they're most comfortable with.

To prevent (Git) diff nightmares just follow these simple steps:

  • Always follow the convention used in the project you're working on. If it is a legacy code base and uses 5 spaces for indenting code, use 5 spaces in the code you add or modify;
  • Have your editor (or Git pre-commit hook) strip all trailing whitespace from your files. Trailing whitespace serves no purpo
@peterjaap
peterjaap / .gitignore
Created September 17, 2014 07:41
Magento .gitignore
# General web stuff
/.htaccess
/robots.txt
/sitemap.xml
/*.sql
/google*.html
# Magento stuff
app/etc/local.xml
downloader/.cache
@thde
thde / whois.conf
Last active September 1, 2023 07:29
/etc/whois.conf WHOIS records for nTLDs.
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc
@mhhansen
mhhansen / magento-test-file.php
Last active November 16, 2020 10:31
Magento : Testing File
<?php
/**
* Magento Testing file
*
* - Copy paste this code and save it as your-filename.php
* - Place it in your Magento root
* - Access to this file to view results: http://<your_domain>/your-filename.php
*/
require 'app/Mage.php';
@renekreijveld
renekreijveld / joomlaupdate
Last active September 17, 2021 13:12
This bash script will update your Joomla 2.5/3.1 website to the latest Joomla version. It does this by automatically downloading the correct update zipfile from Joomla.org. The script also executes the sql update commads (if needed). If specified joomlaupdate will make a backup of your website and database before updating. Joomlaupdate can also …
#!/bin/sh
# joomlaupdate
# Updates your Joomla 2.5/3.1 website to the latest version.
#
# Usage: joomlaupdate [-s] [-b] [-h] [-l]
#
# Default action is verbose on, no backup.
# -s Silent. Do not display any informational messages.
# -b Backup. Create a backup before updating.
@mkdizajn
mkdizajn / magento local.xml override stores base url
Last active January 10, 2017 11:02
magento local.xml override stores base url
<config>
<global>
<!-- ... -->
</global>
<stores>
<default>
<web>
<unsecure>
<base_url>http://beispiel.tld/shop/</base_url>
</unsecure>