Skip to content

Instantly share code, notes, and snippets.

@Ajnasz
Ajnasz / noemoji.pl
Created October 14, 2014 11:53
# Replace annoying emojis. You can see them on slack, for example.
# noemoji.pl
#
# Replace annoying emojis. You can see them on slack, for example.
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '1.0';
@Ajnasz
Ajnasz / serve.js
Last active October 28, 2015 20:44
/*jshint node:true*/
/*eslint-env node*/
var fs = require('fs');
var url = require('url');
var mime = require('mime');
var path = require('path');
function serveError(code, res) {
'use strict';
res.writeHead(code);
#!/bin/sh
# IN=LVDS-0;
IN=eDP1
LASTDISPLAY=$IN
setoff() {
for display in `xrandr | awk '/ disconnected/ {print $1}'`; do
echo "maybe disabling $display";
#!/bin/sh
# Set mouse accelaration of Logitech device
# Logitech M570 Trackball
sleep 1
DEVICEID=$(xinput --list | gawk 'match($0, /Logitech M570.*id=([0-9]+)/, ary) {print ary[1]}')
#!/bin/sh
# /etc/acpi/thinkpadbrightness.sh
#
# Script to change brightness of a ThinkPad t540p
#
# put this to /etc/acpi/events/thinkpad-brightness-down
#
# event=video/brightnessdown BRTDN 00000087 00000000
# action=/etc/acpi/thinkpadbrightness.sh down
Xft.antialias:true
!------------------------------------------------------------------------------
! c o l o r - s e t t i n g s
*background: #000000
*foreground: #EEEEEC
#!/bin/bash
str=`grep -o "_t_('[a-z0-9_.]\+" $1 | head -n 1 | cut -c6-500 | rev | cut -d. -f2- | rev`
shift
echo "$str.$@" | sed -e 's/ /./g'
#!/bin/sh
# Copyright (C) 2014 <Lajos Koszti>
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF
[skin]
description=Ajnasz Blue Theme. Midnight Commander skin from Ajnasz.
[Lines]
horiz=─
vert=│
lefttop=┌
righttop=┐
leftbottom=└
rightbottom=┘
@Ajnasz
Ajnasz / 99ZZZ_lock
Last active December 25, 2015 08:48
Locks the screen after wakeup
#!/bin/sh
# Lock screen after wakeup
[ -f /proc/acpi/ibm/led ] || exit $NA
# User who locked the screen
USERNAME="ajnasz"
# Command to lock the screen
COMMAND="/usr/local/bin/alock -auth pam -bg blank"