Skip to content

Instantly share code, notes, and snippets.

View nooitaf's full-sized avatar
🕶️
deal with it

Ralf Brandenstein nooitaf

🕶️
deal with it
View GitHub Profile
@scturtle
scturtle / ftpserver.py
Created June 20, 2011 16:03
simple ftp server by python
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
local_ip = socket.gethostbyname(socket.gethostname())
local_port = 8888
currdir=os.path.abspath('.')
@ramn
ramn / .muttrc
Last active February 8, 2022 17:48
Muttrc example with GMail support
##
## IMAP CREDENTIALS
##
set smtp_url = "smtp://some_user@smtp.gmail.com:587/"
#set smtp_pass = "password"
set from = "someuser@example.com"
set realname = "Some User"
##
## IMAP SETTINGS
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@glasser
glasser / cat_test.js
Created September 19, 2012 19:37
Node 0.8 child_processes can't use /dev/stdin or /proc/self/fd/N
var spawn = require('child_process').spawn;
var cp = spawn('cat', ['/proc/self/fd/0']);
cp.stdout.setEncoding('utf8');
cp.stdout.on('data', function (chunk) {
console.log("child stdout: ", chunk);
});
cp.stderr.setEncoding('utf8');
@cgoldberg
cgoldberg / camel.pl
Created December 18, 2012 21:26
Perl Camel code - render 4 ascii camels from camel-styled source code.
#!/usr/bin/perl -w # camel code
use strict;
$_='ev
al("seek\040D
ATA,0, 0;");foreach(1..3)
{<DATA>;}my @camel1hump;my$camel;
my$Camel ;while( <DATA>){$_=sprintf("%-6
9s",$_);my@dromedary 1=split(//);if(defined($
_=<DATA>)){@camel1hum p=split(//);}while(@dromeda
@m-ou-se
m-ou-se / clock.scad
Last active December 11, 2016 12:48
3D model for my whiteboard clock
$fs=1;
$fa=1;
servo_l = 24;
servo_w = 13;
servo_h = 21;
bolt_hole_diameter = 4.5;
servo_axis_diameter = 4;
@floehopper
floehopper / install.txt
Created February 27, 2015 16:28
Installing GQRX on Mac OSX Yosemite v10.10.2
# Based on https://github.com/metacollin/homebrew-gnuradio#homebrew-gnuradio and https://github.com/chleggett/homebrew-gqrx#install
$ brew update
$ brew upgrade # may be unnecessary
$ brew tap metacollin/gnuradio
$ brew install gnuradio # took 55 mins on my laptop & installed python via homebrew
$ brew install librtlsdr --HEAD # this installed b4c4e723f3656954f160b3f8df4e8804e4a46acd for me
$ brew tap chleggett/gqrx
$ brew tap chleggett/gr-osmosdr
$ pip install cheetah
@DanielDornhardt
DanielDornhardt / gist:0f3628c898b946a7cc4d
Created April 8, 2015 22:08
Saving additional info to images using collectionFS on the server
if Meteor.isServer
crypto = Npm.require 'crypto'
# find our "code" dir / the directory outside of meteor
pathArr = process.env.PWD.split '/'
pathArr.pop()
filesBasePath = pathArr.join '/'
filesBasePath = filesBasePath + '/uploads/example/'
fsOptionsOriginalSizeJpg =
@wzup
wzup / .jsbeautifyrc
Last active March 30, 2023 13:40
.jsbeautifyrc file example
{
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones.
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"],