Skip to content

Instantly share code, notes, and snippets.

View mblankleder's full-sized avatar

Michel Blankleder mblankleder

View GitHub Profile
@mblankleder
mblankleder / hamclock.service
Last active December 26, 2024 19:29
Hamclock systemd autostart
# sudo vi /lib/systemd/system/hamclock.service
[Unit]
Description=Hamclock Autostart
[Service]
Type=simple
# User=root for other Linux systems
User=pi
ExecStart=/usr/local/bin/hamclock -t 10 -n 30

Keybase proof

I hereby claim:

  • I am mblankleder on github.
  • I am michelblankleder (https://keybase.io/michelblankleder) on keybase.
  • I have a public key whose fingerprint is C040 5B96 7E05 ED0A 5732 26EB 421D AC98 6763 E0A9

To claim this, I am signing this object:

@mblankleder
mblankleder / web-servers.md
Created December 22, 2016 17:19 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mblankleder
mblankleder / kibana
Last active August 29, 2015 14:09
Kibana 4 init script
#!/bin/sh
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: kibana
# Description: Minimal start script for kibana 4
@mblankleder
mblankleder / vimrc
Last active August 29, 2015 14:05
~/.vimrc file for vi editor
" git clone git://github.com/vim-ruby/vim-ruby.git ~/.vim/bundle/vim-ruby
set background=dark
set tabstop=2
set shiftwidth=2
set expandtab
syntax on
set nocompatible
filetype on " Enable filetype detection
#!/bin/bash
DEB_VER=`cat /etc/debian_version`
OS=`uname -o`
KERNEL=`uname -v |awk -F ' ' '{print $4}'`
echo "$OS Debian $DEB_VER"
echo "Kernel $KERNEL"
konqueror --version
#chromium --version|awk -F " " '{print $1" "$2}'
/opt/google/chrome/google-chrome --version
java -version
@mblankleder
mblankleder / channel_use.sh
Created September 4, 2012 22:56
Displays a list of wifi channels in use around. To select an empty one and avoid interference.
iwlist wlan0 scan |grep "Channel" |grep "Freq" |awk -F " " '{print $4}'|sed s/\)//g |sort -g |uniq -c
@mblankleder
mblankleder / mount.nexus.sh
Created August 13, 2012 07:59
mount mtp for samsung galaxy nexus
#!/bin/bash
sudo mtpfs -o allow_other /media/Nexus/
# sudo umount /media/Nexus/
@mblankleder
mblankleder / checkLogin.php
Created July 19, 2012 19:23
Test to make sure that the session variable is working
<?php
//start the session
session_start();
//check to make sure the session variable is registered
//if(session_is_registered('username')) {
if(isset($_SESSION['username'])){
//the session variable is registered, the user is allowed to see anything that follows
@mblankleder
mblankleder / string_in_file.rb
Created June 20, 2012 11:00
Match if a string exist inside a text file
if File.readlines('/etc/passwd').grep(/jdoe/).any?
puts "existe"
else
puts "no existe"
end