Skip to content

Instantly share code, notes, and snippets.

View SteelBlueVision's full-sized avatar

SteelBlueVision SteelBlueVision

View GitHub Profile
@TheWover
TheWover / SystemProcessInformation.cpp
Last active April 13, 2025 12:04
Demonstrates use of NtQuerySystemInformation and SystemProcessInformation variants to enumerate processes without opening handles
// Demonstrates use of NtQuerySystemInformation and SystemProcessInformation variants to enumerate processes without opening handles
// Author: TheWover
//
#include <iostream>
#include <string>
#include "ntdefs.h"
bool demoSystemProcessInformation(bool full)
{
@ilayshp
ilayshp / node_test.py
Created March 21, 2019 07:07
[python] node creation, add connection in xpresso, c4d
import c4d
def main():
global vecoutp
obj = doc.GetActiveObject()
tag = doc.GetActiveTag()
if not tag:
tag = c4d.BaseTag(c4d.Texpresso)
obj.InsertTag(tag)
@roachhd
roachhd / README.md
Last active May 29, 2025 16:27
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@markstos
markstos / gist:3431863
Created August 23, 2012 03:23 — forked from schwern/gist:896004
Benchmarking simple accessors, Moose vs Moos vs Mouse vs Moo vs hand written vs a hash
#!/usr/bin/env perl
use strict;
use warnings;
use Carp;
BEGIN {
# uncomment to test pure Perl Mouse
# $ENV{MOUSE_PUREPERL} = 1;
@mfontani
mfontani / raptor.sh
Created June 23, 2011 13:10
raptor -- type less to do more with a Perl one-liner
# Based on http://blogs.perl.org/users/randy_stauner/2011/06/exploratory-one-liners-with-less-typing.html
# and a couple more things which are *really* handy
function raptor {
case "$1" in
-*) break ;;
'')
echo "Syntax: raptor [-lneEp etc] 'code'
The code can make use of:
DD() to Data::Dumper::Dumper() a thing, D() to say() it
YY() to YAML::Dump() a thing, Y() to say() it
@andreberg
andreberg / CINEMA 4D Python Plane Class.py
Last active October 26, 2020 17:30
[CINEMA 4D: Python Plane Class] Class representing a plane defined by position and normal vector. Can calculate point distance and line intersections. #cinema4d #c4d #python #class #plane #computergraphics #cg
class Plane(object):
"""Represents a plane defined by position and normal vector"""
def __init__(self, pos, n):
super(Plane, self).__init__()
self.pos = pos
self.n = n.GetNormalized()
if DEBUG: print "self.pos = %r, self.n = %r" % (pos, n)
def setN(self, newn):
self.n = newn.GetNormalized()
@andreberg
andreberg / CINEMA 4D Python Helpers.py
Last active May 13, 2025 17:23
[CINEMA 4D: Python Helpers Class] The Helpers class is collection of reusable methods from cgsociety, the Plugin Café and from my own scripts. #cinema4d #c4d #python #class #helpers #computergraphics #cg
class Helpers(object):
"""Contains various helper methods."""
def __init__(self, arg):
super(Helpers, self).__init__()
@staticmethod
def readConfig(filepath=None):
"""
Read settings from a configuration file.
@andreberg
andreberg / C4D-SetGlobalAxisRotation.py
Last active May 9, 2020 19:45
[CINEMA 4D: Python Set Global Axis Rotation Func] A function for setting the orientation of the object axis withouth modifying the points. #cinema4d #c4d #python #function #computergraphics #cg
def SetGlobalAxisRotation(obj, rot, depth=0):
"""
Set the global rotation of the object axis (i.e. keeping points in place).
obj object
rot vector
"""
# unfortunately tail recursion and depth guard
# seem needed because of the MatrixToHPB(HPBToMatrix(Rad(angle))
# roundtrip round-off error, so we need to improve
@andreberg
andreberg / sRGB Response Curve
Last active May 9, 2020 19:46
[sRGB Response Curve] Math formula for generating a sRGB standard response curve. #color #colorcorrection #colorprofile #standard
if (in <= 0.00304)
{
out = in*12.92;
}
else
{
out = (1.055 * pow(in, (1.0/2.4)) - 0.055);
}