Skip to content

Instantly share code, notes, and snippets.

View ivoarch's full-sized avatar

ivoarch (Ivaylo Kuzev) ivoarch

View GitHub Profile
@arnested
arnested / README.md
Last active July 5, 2022 13:30
Using Font Awesome in the Emacs mode line

Font Awesome icons in Emacs mode-line

I installed Font Awesome and uses it to make my Emacs mode line look cool:

  • Use the align-left icon for auto-fill-mode.
  • Use the thumbs-up and thumbs-down icons for flymake status (we need to reimplement flymake-report-status to make this happen).
  • Use the tags icon for gtags-mode.

Requirements: diminish.el - I installed it from MELPA.

@kaleocheng
kaleocheng / change_brightness.sh
Last active August 29, 2015 14:03
根据时间改变屏幕的亮度(配合crontab使用)
#!/usr/bin/env bash
#Filename: change_brightness.sh
#这个脚本会根据当前时间来改变系统屏幕的亮度,最好配合crontab来使用,而且我把他放在了/etc/rc.local中开机执行.
current_time=`date +%H`
case $current_time in
0|1|2|3|4|5|6|22|23)
#echo 'Night'
#这一句得用root权限来执行(sudo在这里也不行)
echo 0 > /sys/class/backlight/acpi_video0/brightness
#now=0
@tunnckoCore
tunnckoCore / tunnckoCore-charlike.md
Last active June 6, 2018 05:08
Charlike Mike Reagent (tunnckoCore) - info about me and links

Charlike Make Reagent [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url] Contact me on Codementor

tunnckocore.tk keybase tunnckocore [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 5, 2025 16:57
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@ivoarch
ivoarch / create_rpmrepo.sh
Created October 1, 2014 19:54
Create RPM Repository for Rhel/CentOS
#!/bin/bash
# Create RPM Repository for Rhel/CentOS
ftpdir="$HOME/Dropbox/Public/rpmrepo"
releases=(el6 el7)
for release in "${releases[@]}"; do
for dir in i386 x86_64 SRPMS; do
pushd "${ftpdir}/${release}/${dir}" >/dev/null 2>&1
createrepo -v .
@ruario
ruario / example-spec-files.md
Last active February 11, 2020 16:57
Example rpm .spec files for recent versions of Opera.

The following are some example .spec files I created to demonstrate how to deal with a more recent libudev version and the different naming of libcrypto on Fedora, via the use of compatibility symlinks. I do this in post install for maximum compatibility as the resultant rpms could also be used on systems where libudev and libcrypto naming matches what Opera expects.

To fetch all the .spec files:

git clone https://gist.github.com/f0183807a9f708067475.git

Place the version of Opera you wish to repackage in your sources directory (usually ~/rpmbuild/SOURCES). Tweak the Version field in the .spec file(s).

To repackage Opera stable:

@ruario
ruario / rpm4opera
Last active January 11, 2016 09:24
Converts Opera deb packages into rpm format
#!/usr/bin/env bash
available () {
command -v "$1" >/dev/null 2>&1
}
rpmcheck () {
if [ -e "$1" ]; then
echo "$1 is already present, delete it if you want to recreate it"
exit 0
interactive("youtube-dl", "download youtube video",
function (I) {
shell_command_blind("youtube-dl " + I.buffer.display_uri_string);
});
@dfletcher
dfletcher / tsws
Last active July 21, 2018 12:47
Totally simple web server using Bash and netcat (nc)
Moved to a proprer repositoy, TSWS is a real boy now!
https://github.com/dfletcher/tsws
PRs welcomed.
@llaumgui
llaumgui / touchpad-toggle.sh
Created October 29, 2015 20:25
Toggle touchpad activation with gsettings.
#!/bin/bash
#
# touchpad-toggle: Toggle touchpad activation with gsettings.
# Copyright (C) 2015 Guillaume Kulakowski <[email protected]>
# Version 1.0
#
SCHEMA="org.gnome.desktop.peripherals.touchpad"
KEY="send-events"