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
@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 =
@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;
@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');
@luizcarlos1405
luizcarlos1405 / bullet.lua
Created August 22, 2016 21:10
LÖVE 06 - VIdeoaula no link: https://youtu.be/pPiAtW-iDJ4
Bullet = {}
Bullet.img = love.graphics.newImage("bullet.png")
function Bullet:create()
local bullet = {}
bullet.w = Bullet.img:getWidth()
bullet.h = Bullet.img:getHeight()
bullet.x = Player.x
bullet.y = Player.y
bullet.ox = bullet.w / 2
@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
@janstuemmel
janstuemmel / README.md
Last active May 26, 2020 13:47
Installation script for a portable platformio editor

a simple install script to build a portable version of the [PlatformIO IDE][pioide] based on the atom editor.

referenced to [platformio/platformio-atom-ide/issues/158][ref]

Usage

  • wget https://gist.githubusercontent.com/janstuemmel/5dea680981d443c8d93c9c7e12f08611/raw/install.sh
  • chmod +x install.sh
  • execute: ./install.sh v1.14.4
@gnalvesteffer
gnalvesteffer / main.lua
Created March 20, 2021 02:22
Teardown Message Scheduler
message_scheduler = {
messages = {},
tick = function()
local current_time = GetTime()
local next_messages_state = {}
for _, timed_message in ipairs(message_scheduler.messages) do
if current_time >= timed_message.time then
DebugPrint(timed_message.message)
else
@tannerli
tannerli / check_compromised.sh
Last active November 12, 2021 12:38
Check for compromised versions of npm packages 'rc' and 'coa'
#!/bin/bash
echo "Searching for rc packages..."
matches=$(find / -type d -path "*/node_modules/rc" 2>/dev/null)
echo -e "Checking for compromised versions...\\n"
for match in $matches
do
egrep 'version\":\s*\"((1.2.9)|(1.3.9)|(2.3.9))' "$match/package.json" && echo -e $match\\n
done
@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
@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"],