This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example.h | |
DECLARE_DYNAMIC_DELEGATE_TwoParams(FBindAllKeysDelegate, const FKey&, Key, bool, bKeyPressed); | |
// example.cpp | |
void UExampleStatics::BindAllKeyInputActions(AActor *Actor, const FBindAllKeysDelegate& Delegate) | |
{ | |
// Get input component from actor | |
UInputComponent *InputComponent = Actor->InputComponent; | |
if (InputComponent == nullptr) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var element = $('.element-with-scrolling'); | |
// don't do this | |
element.attachEventListener('scroll'); | |
// do this instead | |
window.requestAnimationFrame(poll); | |
var pollScrollPos = function () { | |
var scrollPos = element.scrollLeft; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. | |
using UnrealBuildTool; | |
using System.IO; | |
public class CEF3 : ModuleRules | |
{ | |
public CEF3(TargetInfo Target) | |
{ | |
/** Mark the current version of the library */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local mp = MediaPlayer.Create( "global" ) | |
-- only allow media which supports FFTs (remove this if you don't want it) | |
mp.ServiceWhitelist = { 'af', 'sc' } | |
if CLIENT then | |
local function audioPostDraw( media ) | |
local fft = media.fft | |
if not fft then return end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Windows newlines with a newline ending every file | |
[*] | |
end_of_line = crlf | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Example; | |
use Zend\EventManager\Event; | |
class ExampleEvent extends Event | |
{ | |
const EVENT_FOOBAR = 'foobar'; | |
protected $value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var source = 'hello world'; | |
function whitespaceEncode(str) { | |
var j, result = ''; | |
for (var i = 0; i < str.length; i++) { | |
var charCode = str.charCodeAt(i); | |
var binStr = charCode.toString(2); | |
var padLen = 7 - (binStr.length % 7); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var files = fs.readdirSync('.'); | |
var UNICODE_PATTERN = /#U([\d\w]{4})/gi; | |
for (var i = 0; i < files.length; i++) { | |
var filename = files[i]; | |
if (!UNICODE_PATTERN.test(filename)) { continue; } | |
var fixedFilename = filename.replace(UNICODE_PATTERN, function (match, grp) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
-- Sublime Glass - Garry's Mod | |
-- | |
-- Use with the 'Sublime Text Trans' package. | |
-- https://github.com/vhanla/SublimeTextTrans | |
-- | |
if SERVER then | |
AddCSLuaFile() | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--=============================================================================-- | |
-- | |
-- This file has been modified to remove any audio that plays on loading screens. | |
-- https://gist.github.com/samuelmaddock/bb2f643ac95dcc6a56e9 | |
-- | |
--=============================================================================-- | |
g_ServerName = "" | |
g_MapName = "" | |
g_ServerURL = "" |