Skip to content

Instantly share code, notes, and snippets.

Victor Stan victorbstan

Block or report user

Report or block victorbstan

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
@victorbstan
victorbstan / StairMaster_ConstructionScript
Last active Dec 20, 2017
Unreal 4.18 Blueprint Script for repeatedly instantiating a mesh with a vector offset. For example: to quickly create an arbitrary long staircase. Copy and paste in an actor's Construction Script Blueprint.
View StairMaster_ConstructionScript
Begin Object Class=/Script/BlueprintGraph.K2Node_FunctionEntry Name="K2Node_FunctionEntry_0"
LocalVariables(0)=(VarName="ForLoopIndex",VarGuid=F6B85B124791C3A6C5AE9CB85E6F158F,VarType=(PinCategory="int"),FriendlyName="For Loop Index",Category=NSLOCTEXT("KismetSchema", "Default", "Default"),PropertyFlags=5,ReplicationCondition=COND_MAX)
SignatureClass=Class'"/Script/Engine.Actor"'
SignatureName="UserConstructionScript"
NodeGuid=6B3464D5426BBA94ED6D2CB353780E8A
CustomProperties Pin (PinId=FE0EFA894063EC185E9B7FA0908386F1,PinName="then",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsArray=False,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,LinkedTo=(K2Node_MacroInstance_0 0190FEC54CBF547DF6F3A596D323679F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValu
@victorbstan
victorbstan / snippets.cson
Created Sep 2, 2016
"Verbatim" Atom snippet for Twig templates
View snippets.cson
'.text.html.twig':
'Verbatim':
'prefix': 'verbatim'
'body': '{% verbatim %}$1{% endverbatim %}$2'
@victorbstan
victorbstan / example.html
Last active Dec 13, 2017
Multi argument 'if' & 'unless' conditionals in Spacebars / Handlebars for Meteor.js
View example.html
<!--
Usage examples
-->
<!-- IF ANY -->
{{#if any truthyOne truthyTwo falsyThree}}
You will see this.
{{/if}}
{{#if any falsyOne falsyTwo falsyThree}}
@victorbstan
victorbstan / CarControl.cs
Last active Jul 10, 2019
Unity car simulation script
View CarControl.cs
using UnityEngine;
using System.Collections;
public class CarControl : MonoBehaviour {
// PUBLIC
public bool driveable = false;
// Wheel Wrapping Objects
@victorbstan
victorbstan / Wheel.cs
Created Feb 11, 2015
C# Unity suspension example script for wheel meshes to follow wheel collider suspensions
View Wheel.cs
using UnityEngine;
using System.Collections;
// ADD THIS SCRIPT TO EACH OF THE WHEEL MESHES / WHEEL MESH CONTAINER OBJECTS
public class Wheel : MonoBehaviour {
public WheelCollider wheelC;
private Vector3 wheelCCenter;
private RaycastHit hit;
View simplebox.js
(function($) {
// SIMPLE BOX
// make your own lightbox cuz they all suck
var imgSrc
, $simpleBox;
window.fitImg = function() {
var $img = $("#simple-box img");
@victorbstan
victorbstan / index.html
Last active Dec 24, 2015
Detecting gamepads in Chrome Canary
View index.html
<html>
<head>
<title>Get Gamepads</title>
</head>
<body>
<!-- adapted from http://stackoverflow.com/questions/10839310/html5-gamepad-api-on-chrome -->
<script>
function updateStatus() {
window.webkitRequestAnimationFrame(updateStatus);
View cameras.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Victor Stan">
<meta name="description" content="Get multiple video streams on one page. Adapted from code by Muaz Khan">
<title>Video Camera</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" ></script>
@victorbstan
victorbstan / profile_photop.rb
Created Jun 14, 2013
A module for defaulting to a gravatar image when your profile's own paperclip image isn't available.
View profile_photop.rb
require 'digest/md5'
module ProfilePhoto
def profile_photo(profile)
profile.avatar.url(:thumb).present? ? profile.avatar.url(:thumb) : "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(profile.owner.email)}?d=mm"
end
end
# in your application_helper use:
# module ApplicationHelper
@victorbstan
victorbstan / webScraperTest.st
Created Mar 20, 2013
Quick and dirty test web scraper in Smalltalk (Pharo2). Simply put it in a "workspace" and "do it". The response output is sent to a "Transcript" window.
View webScraperTest.st
| myHost myPath |
"setup"
myHost := 'rmod.lille.inria.fr'.
myPath := '/pbe2'.
ZnClient new
systemPolicy;
accept: ZnMimeType textHtml;
http;
You can’t perform that action at this time.