Skip to content

Instantly share code, notes, and snippets.

Eugene grisevg

Block or report user

Report or block grisevg

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
View scales.cpp
#include "FastLED.h"
#include <CapacitiveSensor.h>
#include <Servo.h>
// WS2812B definitions
#define NUM_LEDS 17
#define DATA_PIN 7
CRGB leds[NUM_LEDS];
int bright = 3;
View adavoice.cpp
#include <avr/interrupt.h>
#include <avr/power.h>
#include <avr/io.h>
#include <WaveHC.h>
#include <WaveUtil.h>
WaveHC wave; // This is the only wave (audio) object, -- we only play one at a time
#define error(msg) error_P(PSTR(msg)) // Macro allows error messages in flash memory
View hair1.cpp
// 'Cyber falls' sketch, adapted from code for Firewalker sneakers.
// Creates a fiery rain-like effect on multiple NeoPixel strips.
// Requires Adafruit Trinket and NeoPixel strips. Strip length is
// inherently limited by Trinket RAM and processing power; this is
// written for five 15-pixel strands, which are paired up per pin
// for ten 15-pixel strips total.
#include <Adafruit_NeoPixel.h>
#include <avr/interrupt.h>
@grisevg
grisevg / AnimatedImage.cpp
Last active Jun 14, 2019
UMG Animated Image.
View AnimatedImage.cpp
#include "AnimatedImage.h"
void UAnimatedImage::SetCurrentFrame(int32 Frame)
{
CurrentFrame = Frame;
if (CurrentFrame < 0) CurrentFrame = 0;
if (CurrentFrame > TotalFrames - 1) CurrentFrame = TotalFrames - 1;
SynchronizeProperties();
}
@grisevg
grisevg / FAsyncQueue.h
Last active May 30, 2019
Utility class for asynchronous/coroutine style programming in UE4 C++
View FAsyncQueue.h
#pragma once
/**
* FAsyncQueue can be used to run asynchronous delegates in sequence, parallel and combinations of the above
*
* Use Add() to enqueue delegates matching FAsyncDelegate signature:
* a void function that accepts a single argument of another void function with no arguments.
*
* Static factories MakeSync, MakeSequence and MakeParallel can be used to wrap different type of delegates and
* delegate collections into a single FAsyncDelegate which can be enqueued with Add().
View add_bans.sql
INSERT INTO `amx_bans` (`player_ip`, `player_id`, `player_nick`, `admin_ip`, `admin_id`, `admin_nick`, `ban_type`, `ban_reason`, `ban_created`, `ban_length`, `server_ip`, `server_name`) VALUES
('', '', '', NULL, 'admin', 'admin', 'SI', 'autocheat', UNIX_TIMESTAMP(), 0, null, 'website');
View .tmux.conf
# More examples https://github.com/tangledhelix/dotfiles/blob/master/tmux.conf
###########################################################################
# Custom
# Allow to use vim navigation keys (hjkl) in tmux scroll mode
setw -g mode-keys vi
# Hack to let term window controll scrolling. Will override `set -g mode-mouse on`
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
View readline.md

URL: http://www.bigsmoke.us/readline/shortcuts

  • Ctrl-A: go to the beginning of line,
  • Ctrl-E: go to the end of line,
  • Alt-B: skip one work backward,
  • Alt-F: skip one word forward,
  • Ctrl-U: delete to the beginning of line,
  • Ctrl-K: delete to the end of line,
  • Alt-D: delete to the end of word.
  • Ctrl-r: Incrementally search the line history ⇧ backwardly
@grisevg
grisevg / .tigrc
Last active Aug 29, 2015
My babun
View .tigrc
set mouse = yes
View puzzle.hx
class Collection {
var arr:Array<Int>;
var i:Int = 0;
public function new(arr:Array<Int>) {
this.arr = arr;
}
public var current(get, set):Int;
function get_current():Int { return arr[i]; }
You can’t perform that action at this time.