This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <errno.h> | |
#include <aio.h> | |
#include <signal.h> | |
#define BUF_SIZE 20 /* Size of buffers for read operations */ | |
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install build-essential automake checkinstall intltool git | |
sudo apt-get install mono-complete gtk-sharp2 gnome-sharp2 | |
git clone https://github.com/mono/mono-addins | |
cd mono-addins | |
./autogen.sh --prefix=/usr | |
make | |
sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Let's assume that <div> containers with text have class="page" and id=page name + "Text". | |
* And the menu <a> links-switchers have class "menuItem" and id=page name + "Item". | |
* | |
* This script applies class "active" to selected page by observing window.location.href, | |
* with "about" as default page. | |
* | |
* demo: http://audioservice.pro/ | |
* | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns lightusers.core | |
(:require [clojure.data.json :as json] | |
[clojure.pprint :refer [pprint]])) | |
(def json-pprint (comp pprint json/write-str)) | |
(def input (json/read-str (slurp "example.json"))) | |
(defn extract | |
([tweet paths] (extract tweet paths [])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; (nyan-mode) | |
(diminish 'yas-minor-mode) | |
(diminish 'helm-mode) | |
(diminish 'company-mode) | |
(setq-default | |
mode-line-format | |
'(" " | |
(:eval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xft.dpi: 96 | |
Xft.antialias: true | |
Xft.hinting: true | |
Xft.hintstyle: hintslight | |
XTerm.vt100.faceName: DejaVu Sans Mono | |
XTerm.vt100.faceSize: 10 | |
XTerm.vt100.background: #000000 | |
XTerm.vt100.foreground: #ffffff | |
XTerm.vt100.utf8Fonts: always | |
XTerm.vt100.utf8:always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defcommand set-backlight (level) ((:number "Set brightness level:")) | |
(with-open-file (sys-backlight-file "/sys/class/backlight/intel_backlight/brightness" | |
:direction :output :if-exists :overwrite) | |
(format sys-backlight-file "~a~%" (* 100 level)))) | |
;; C-u [1-9] changes level | |
(defvar *brightness-map* nil) | |
(setf *brightness-map* | |
(let ((b (make-sparse-keymap))) | |
(loop for level from 1 below 10 by 1 do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun should-collapse-p () | |
(string-match-p "\s-*(def.*" | |
(buffer-substring-no-properties | |
(line-beginning-position) | |
(line-end-position)))) | |
(defun open-by-controller (should-collapse-p) | |
(let* ((region (yafolding-get-element-region)) | |
(beg (car region)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns signals-handler | |
(:import [sun.misc Signal SignalHandler])) | |
(defn handle-signals | |
"Sets up POSIX signal handlers." | |
[] | |
(Signal/handle | |
(Signal. "HUP") | |
(proxy [SignalHandler] [] | |
(handle [sig] |
OlderNewer