Skip to content

Instantly share code, notes, and snippets.

View henfiber's full-sized avatar

Ilias Ktn henfiber

View GitHub Profile
@lmullen
lmullen / README.md
Created September 1, 2014 20:49
Getting the Ace editor to work with gitit

The file page.st goes in the templates/ directory in the Gitit wiki home directory. You'll put the Ace JavaScript and CSS files in static/.

sample codebook.

It's very similar to a Statistical Analysis Plan, actually.

Setup, there is a dogwalking business. It wants to analyze its work.

Raw data is: name of dog, address of owner, time walked, date walked, size of dog (small, medium, or large), health of dog (well or sick) on that date and time, comments, and pay.

The business wants to assign ID# to the dogs, and codewords to the address to make this data anonymous. There isn't anything to do to the comments--since free text is all over the place.

@Centril
Centril / philips-tv-unknown-sources
Created March 26, 2015 17:54
how to enable unknown sources in a Philips TV (android)
1. Download [terminal emulator] from playstore.
2. Open [terminal emulator] and execute the following: `am start --user 0 -n com.android.settings/.SecuritySettings`. This will launch the Security Settings which Philips has hidden.
3. Scroll down and: Enable unknown sources.
4. Profit.
<!-- references -->
[terminal emulator]: https://play.google.com/store/apps/details?id=jackpal.androidterm
@tkh44
tkh44 / atom-one-dark.css
Created August 6, 2015 17:47
compiled one dark theme to make porting easier for idea intellij/webstorm products
@import 'languages/css';
atom-text-editor,
:host {
background-color: #282c34;
color: #abb2bf;
}
atom-text-editor .line.cursor-line,
:host .line.cursor-line {
background-color: rgba(153, 187, 255, 0.04);
}
@mvoropaiev
mvoropaiev / fedora.sh
Last active December 27, 2016 08:44
some useful fedora 23 install cmds
#!/usr/bin/env bash
set -ex
## update system
sudo dnf upgrade --assumeyes --refresh
## fstrim (on luks, no lvm)
# 1. add 'rd.luks.options=discard' to /etc/default/grub (at the end of `GRUB_CMDLINE_LINUX="... rd.luks.options=discard"`)
# 2. run 'sudo grub2-mkconfig -o /boot/grub2/grub.cfg'
# 3. add `luks,allow-discards` too all encrypted volumes in /etc/crypttab (at the end of line)
@javier-lopez
javier-lopez / daemonize_function.sh
Created October 15, 2015 07:00
daemonize sh function
_daemonize()
{ #daemonize an external command
#http://blog.n01se.net/blog-n01se-net-p-145.html
[ -z "${1}" ] && return 1
( # 1. fork, to guarantee the child is not a process
# group leader, necessary for setsid) and have the
# parent exit (to allow control to return to the shell)
# 2. redirect stdin/stdout/stderr before running child
[ -t 0 ] && exec </dev/null
@henfiber
henfiber / compare_compilers.R
Last active October 5, 2022 08:54 — forked from ronert/compare_compilers.R
Updated combo benchmark (25.R,RevoR,loess,LAPACK benchmarks)
#####################
## Updated and combo benchmark
## Including :
## R-benchmark-25.R from Simon Urbanek
## Revolution Analytics benchmarks : http://www.revolutionanalytics.com/revolution-revor-enterprise-benchmark-details
## Extra benchmarks (loess and eigen)
## LAPACK benchmarks (QR,eigen,cholesky,svd,prcomp,balance,kappa,norm,solve)
## TODO:
## add extra functions like dist() and cluster() - also provided by gputools
## separate the gpu from cpu benchmarks, and the analysis from the benchmark code
@streetturtle
streetturtle / sp
Last active February 9, 2025 13:31 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
#!/bin/sh
set -e
MATTERMOST_API="FILL-IN-MATTERMOST-ENDPOINT"
MATTERMOST_TOKEN="FILL-IN-INTEGRATION-TOKEN"
MATTERMOST_USERNAME="AN-USERNAME"
MATTERMOST_ICON="AN-URL-TO-AN-IMAGE"
die() {
@SebastianCarroll
SebastianCarroll / clear_hadoop_logs.sh
Created October 14, 2016 17:40
Simple script to clear hadoop logs from a cluster. Not an amazing solution to the problem
#!/bin/bash
HOSTS="host1 host2 host3 host4"
RETENTION_TIME=14
echo "$(date) - Log Cleaner - $RETENTION_TIME days - $HOSTS" >> /var/log/hadoop_log_cleaner.log
for host in $HOSTS
do
ssh root@$host << ENDSSH