Skip to content

Instantly share code, notes, and snippets.

View nashamri's full-sized avatar
🐧

Nasser Alshammari nashamri

🐧
View GitHub Profile
anonymous
anonymous / update-qt4.sh
Created May 11, 2017 15:35
Quick and simple shell script for updating lib32-qt4 in Arch Linux.
#!/bin/bash
# Based on the directions here: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot
# This will take a while to build, with most of the time spent on QT4. There is some redundancy with creating
# multiple clean chroots, but I think this approach is easier and more reliable for most systems.
# Specify a build directory. Defaults to /tmp:
BUILDDIR="/tmp"
# Install devtools if it's not already installed:
@cryzed
cryzed / fix-infinality.md
Last active January 19, 2024 08:56
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

(defun spacemacs//emacs-lisp-eval-region-and-print (beg end)
(interactive)
(eval-sexp-fu-flash (cons beg end))
(let* ((raw-result (with-output-to-string
(eval-region beg end standard-output)))
(result (when (>= (length raw-result) 1)
(substring raw-result 1 -1))))
(when result
(cider--display-interactive-eval-result result end))))
@cogmission
cogmission / QuickTest.py
Last active July 28, 2016 15:53
Example Use of Raw HTM Algorithms
'''
Created on Feb 8, 2015
@author: David Ray
'''
import numpy as np
from nupic.encoders.scalar import ScalarEncoder as ScalarEncoder
from nupic.algorithms.CLAClassifier import CLAClassifier as CLAClassifier
@travisbhartwell
travisbhartwell / nix-shell-shebang.md
Last active March 29, 2024 19:55
nix-shell and Shebang Lines

NOTE: a more up-to-date version of this can be found on my blog

nix-shell and Shebang Lines

A few days ago, version 1.9 of the Nix package manager was released. From the release notes:

nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.

@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@bradclawsie
bradclawsie / uuid.hs
Created February 18, 2012 06:03
generate hashed and random uuids in haskell
{-# LANGUAGE PackageImports #-}
module Main where
import qualified Data.Char as C
import qualified Data.Word as W
-- must qualify this (requiring the ghc pragma above) to disambiguate
-- from the Data.UUID also in system-uuid
import qualified "uuid" Data.UUID as U
import qualified Data.UUID.V5 as U5