Skip to content

Instantly share code, notes, and snippets.

🔥
Insane in the membrane

Noora noorus

🔥
Insane in the membrane
  • Helsinki, Finland
Block or report user

Report or block noorus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@noorus
noorus / nm_vec4f.hpp
Last active Sep 24, 2018
AVX-256 vec4 (Haswell/Excavator or newer)
View nm_vec4f.hpp
#pragma once
#include <cstdint>
#include <intrin.h>
#define nmath_avx_align __declspec(align(32))
namespace nmath {
using Real = double; // tmp
@noorus
noorus / techtree.json
Last active Oct 21, 2017
StarCraft II Legacy of the Void v3.19.1.58600 Multiplayer
View techtree.json
{
"protoss" :
{
"Gateway" :
{
"builds" :
[
{
"ability" : "GatewayTrain",
"abilityCommand" : "Train1",
View check.sh
#!/bin/sh
sudo updatedb
locate "node_modules/babelcli"
locate "node_modules/cross-env.js"
locate "node_modules/crossenv"
locate "node_modules/d3.js"
locate "node_modules/fabric-js"
locate "node_modules/ffmepg"
locate "node_modules/gruntcli"
locate "node_modules/http-proxy.js"
@noorus
noorus / photoutil.js
Created Jun 4, 2016
old photoutils backup
View photoutil.js
var shelly = require( "shelly" );
var childProcess = require( "child_process" );
var typist = require( "typist" );
var moment = require( "moment" );
var gm = require( "gm" );
var Q = require( "q" );
var im = gm.subClass({ imageMagick: true });
module.exports = {
View netcat.c
// for license see license.txt
/* Netcat 1.00 951010
A damn useful little "backend" utility begun 950915 or thereabouts,
as *Hobbit*'s first real stab at some sockets programming. Something that
should have and indeed may have existed ten years ago, but never became a
standard Unix utility. IMHO, "nc" could take its place right next to cat,
cp, rm, mv, dd, ls, and all those other cryptic and Unix-like things.
View ScopedSRWLock.hpp
//! \class ScopedSRWLock
//! Automation for scoped acquisition and release of an SRWLOCK.
//! \warning Lock must be initialized in advance!
class ScopedSRWLock: boost::noncopyable
{
protected:
PSRWLOCK mLock;
bool mExclusive;
public:
@noorus
noorus / SafeHandle.hpp
Last active Aug 29, 2015
unique_ptr for WinAPI HANDLEs
View SafeHandle.hpp
//! \class SafeHandle
//! Unique_ptr wrapper for WinAPI handles.
class SafeHandle: public std::unique_ptr<std::remove_pointer<HANDLE>::type,void(*)( HANDLE )>
{
public:
SafeHandle( HANDLE handle ): unique_ptr( handle, &SafeHandle::close )
{
}
operator HANDLE()
@noorus
noorus / CreditCard.php
Last active Aug 29, 2015
Some quickie dumb credit card decoding stuff
View CreditCard.php
<?php
class CreditCard
{
const Industry_ISO = 0;
const Industry_Airlines = 1;
const Industry_Airlines2 = 2;
const Industry_Travel = 3;
const Industry_Financial = 4;
const Industry_Financial2 = 5;
@noorus
noorus / fixperms.sh
Last active Dec 11, 2015
convert users on a linux system to use shared group "staff"
View fixperms.sh
#!/bin/bash
sed -i 's/umask .*/umask 002/g' /etc/skel/.bashrc
for dir in /home/*
do
sed -i 's/umask .*/umask 002/g' ${dir}/.bashrc
usr=${dir##*/}
adduser $usr staff
usermod -g staff $usr
done
View .bashrc
umask 022
export LC_ALL=en_US.UTF-8
[ -z "$PS1" ] && return
HISTCONTROL=ignoreboth
shopt -s histappend
shopt -s checkwinsize
GIT_PS1_SHOWDIRTYSTATE=1
You can’t perform that action at this time.