Skip to content

Instantly share code, notes, and snippets.

Valentin Funk Kamshak

Block or report user

Report or block Kamshak

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
Kamshak / no_selection.lua
Last active Sep 28, 2015
Put this into a new file in lua/autorun/no_model_selection.lua to disable sandbox player selection
View no_selection.lua
hook.Add( "InitPostEntity", "RemoveEditor", function( )
list.Set( "DesktopWindows", "PlayerEditor", {
title = "Player Model",
icon = "icon64/playermodel.png",
width = 250,
height = 50,
onewindow = true,
Kamshak / provision-node-kubernetes-ubuntu
Last active Apr 15, 2016
Some instructions for adding a new node to the cluster using the ubuntu scripts
View provision-node-kubernetes-ubuntu
export nodes="root@<MASTER NODE> root@<NEW NODE>"
export role="ai i"
export NUM_NODES=${NUM_NODES:-2}
<IN kubernetes/cluster/>
Kamshak / custom-router.js
Last active Oct 5, 2016
View custom-router.js
* State-based routing for AngularJS
* @version v1.0.0-beta.3
* @link
* @license MIT License,
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("angular"));
else if(typeof define === 'function' && define.amd)
# Creates Structures TypeInfo / TypeInfoData
def initStructures():
strucId = GetStrucIdByName("TypeInfo")
if (strucId == BADADDR):
strucIdInfoData = AddStrucEx(-1, "TypeInfoData", 0)
AddStrucMember(strucIdInfoData, "m_name", -1, (FF_QWRD|FF_DATA|FF_0CHAR), ASCSTR_C, 8)
ApplyType(GetMemberId(strucIdInfoData, 0), ParseType("char*", 0))
strucId = AddStrucEx(-1, "TypeInfo", 0)
AddStrucMember(strucId, "m_infoData", -1, (FF_QWRD|FF_DATA|FF_0STRO), 0, 8)
Kamshak / some.component.html
Created Jan 4, 2017
Angular 2 Waypoints using ng2-scrollspy
View some.component.html
<div scrollSpy>
<div [waypoint]="i" *ngFor="let i of [1,2,3,4,5,6,7,8]">
{{ i }}


thanks for the speedy response. The devtool setting is set to hidden-source-map. I've just skimmed the plugin's source code and it does not set any header. Does that mean that when uploading a sourcemap without a comment reference in the minified file i need to set a HTTP header when uploading?

I've tried reading the CLI's source for some information and it seems that a x-sourcemap header is set. (Unfortunately does not provide any information on this). I'll make a pull request for the webpack plugin to include that header if this is the case.

What format should the header value have? E.g. I have a file index.bundle.js and, do i set it to ~/index.bundle.js?

View gist:156ec1c39419b8cc2047efe1513d207d
// ==UserScript==
// @name ɮuy shit faster
// @namespace
// @version 0.1
// @description ๖ۣɮuy shit faster
// @author VALLUS
// @include
// @grant none
// ==/UserScript==
Kamshak / print.lua
Last active Jun 27, 2017
Example for Drops and Crates custom lua crate and function to print all item class names.
View print.lua
local str = LibK._(Pointshop2.GetRegisteredItems()):chain()
return { className = item.className, name = item:GetPrintName() }
:sort(function(a, b)
if tonumber(a.className) and tonumber(b.className) then
return tonumber(a.className) < tonumber(b.className)
elseif tonumber(a) and not tonumber(b) then
return false
Kamshak / random.lua
Last active Jun 28, 2017
Give a random item from category
View random.lua
local function GiveRandomItemFromCategory( ply, categoryName )
local factory = Pointshop2.ItemFromCategoryFactory:new()
factory.settings = {
["ManualSettings.CategoryName"] = categoryName,
["BasicSettings.WeightedRandom"] = true
local item = factory:CreateItem( true )
return ply:PS2_EasyAddItem( item.class.className )
Kamshak / leaveSessionTracker.js
Last active Jul 3, 2017
Sends events to analytics in timeouts to improve session tracking
View leaveSessionTracker.js
ga('send', 'event', 'Website', 'Unload', {transport: 'beacon', nonInteraction:true});
var timeout = 1;
var startTime = new Date().getTime();
function startBeacon() {
var timeOnSite = (startTime - new Date().getTime()) / 1000;
You can’t perform that action at this time.