Skip to content

Instantly share code, notes, and snippets.

View sneetsher's full-sized avatar
🙂
I may be slow to respond.

Abdellah C. sneetsher

🙂
I may be slow to respond.
  • Jijel, Algeria
View GitHub Profile
@sneetsher
sneetsher / radio.lua
Created December 10, 2020 09:53 — forked from yoavst/radio.lua
Radio recorder
function descriptor()
return {
title = "Radio recorder",
version = "0.1",
author = "Yoav",
url = "",
shortdesc = "Radio recorder",
description = "Helps record the radio",
capabilities = { "input-listener" }
}
@sneetsher
sneetsher / AskUbuntu_Troubleshooting_Hints.md
Last active November 12, 2020 11:45
Hints about some important commands for troubleshooting, prepared for Ask Ubuntu

File

locate ..
find .. -iname ..

Debian/Ubuntu Package

dpkg -s ..
dpkg -L

apt-cache policy ..:*

@sneetsher
sneetsher / arabic.yml
Last active December 25, 2019 10:34
arabic dict for koheiw/newsmap
# Created by عبدالله شلي (Abdellah Chelli) for the newsmap package: https://github.com/koheiw/newsmap
AFRICA:
EAST:
'BI': [بوروندي, *بوروندي*, بوجمبورا]
'DJ': [جيبوتي*, جيبوتي*]
'ER': [إريتريا, *إريتري*, أسمرة]
'ET': [إثيوبيا, *إثيوبي*, أديس أبابا]
'KE': [كينيا, *كيني*, نيروبي]
'KM': [جزر القمر, *قمري*, موروني]
@sneetsher
sneetsher / ubuntu-raid.sh
Created January 6, 2017 10:14 — forked from umpirsky/ubuntu-raid.sh
Install Ubuntu on RAID 0 and UEFI/GPT system
# http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer
# http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D
sudo -s
apt-get -y install mdadm
apt-get -y install grub-efi-amd64
sgdisk -z /dev/sda
sgdisk -z /dev/sdb
sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sda
sgdisk -n 2:0:+8G -t 2:fd00 -c 2:"Linux RAID" /dev/sda
@sneetsher
sneetsher / crc16.c
Created March 25, 2016 10:34 — forked from jlamothe/crc16.c
CRC16 checksum calculator
#include <stdint.h>
#define CRC16 0x8005
uint16_t gen_crc16(const uint8_t *data, uint16_t size)
{
uint16_t out = 0;
int bits_read = 0, bit_flag;
/* Sanity check: */
@sneetsher
sneetsher / pango_layout_word_wrap.c
Created December 18, 2015 21:33 — forked from bert/pango_layout_word_wrap.c
Pango layout word wrap example
/*!
* \file pango_layout_word_wrap.c
* \brief pango layout word wrap
*
* \author Ben Pfaff http://benpfaff.org
*
* In working with Pango I found an oddity that I do not understand.
* It may be a bug, or it might just be my misunderstanding.
*
* As part of a table layout procedure for printing, my code wishes to find out
#!/bin/bash
set -e
if [ $UID -ne 0 ]
then
sudo $0
fi
readonly BAT_LIMIT_PATH=/sys/devices/platform/sony-laptop/battery_care_limiter
readonly USB_CHARGE_PATH=/sys/devices/platform/sony-laptop/usb_charge
@sneetsher
sneetsher / indicator_demo.cs
Created March 26, 2015 08:09
Ubuntu Unity - indicator demo
/*
Compile & Run:
dmcs -pkg:gtk-sharp-2.0 -pkg:appindicator-sharp-0.1 indicator_demo.cs
mono indicator_demo.exe
*/
using Gtk;
using AppIndicator;
/* Example code of using harfbuzz together with Core Text APIs. */
#include <hb-coretext.h>
int main(int argc, char* argv[]) {
if (argc != 3) {
fprintf(stderr, "usage: %s <PostScript-Name> <text>\n", argv[0]);
return 1;
}
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include FT_OUTLINE_H
#include <hb.h>