Skip to content

Instantly share code, notes, and snippets.

@ValentinFunk
ValentinFunk / no_selection.lua
Last active September 28, 2015 11:28
Put this into a new file in lua/autorun/no_model_selection.lua to disable sandbox player selection
AddCSLuaFile()
hook.Add( "InitPostEntity", "RemoveEditor", function( )
list.Set( "DesktopWindows", "PlayerEditor", {
title = "Player Model",
icon = "icon64/playermodel.png",
width = 250,
height = 50,
onewindow = true,
@ValentinFunk
ValentinFunk / provision-node-kubernetes-ubuntu
Last active April 15, 2016 17:13
Some instructions for adding a new node to the cluster using the ubuntu scripts
export nodes="root@<MASTER NODE> root@<NEW NODE>"
export role="ai i"
export NUM_NODES=${NUM_NODES:-2}
export SERVICE_CLUSTER_IP_RANGE=192.168.3.0/24
export FLANNEL_NET=172.16.0.0/16
./new-node.sh
<IN kubernetes/cluster/new-node.sh>
#!/bin/bash
@ValentinFunk
ValentinFunk / custom-router.js
Last active October 5, 2016 17:43
ui-router-custom.js
/*!
* State-based routing for AngularJS
* @version v1.0.0-beta.3
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("angular"));
else if(typeof define === 'function' && define.amd)

Hi,

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 https://docs.sentry.io/api/releases/post-release-files/ 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 index.bundle.js.map, do i set it to ~/index.bundle.js?

// ==UserScript==
// @name ɮuy shit faster
// @namespace http://tampermonkey.net/
// @version 0.1
// @description ๖ۣɮuy shit faster
// @author VALLUS
// @include http://agariohub.net/client/shop
// @grant none
// ==/UserScript==
@ValentinFunk
ValentinFunk / print.lua
Last active June 27, 2017 11:15
Example for Pointshop2.com Drops and Crates custom lua crate and function to print all item class names.
local str = LibK._(Pointshop2.GetRegisteredItems()):chain()
:map(function(item)
return { className = item.className, name = item:GetPrintName() }
end)
: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
else
@ValentinFunk
ValentinFunk / random.lua
Last active June 28, 2017 11:48
Give a random item from category
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 )
end
@ValentinFunk
ValentinFunk / leaveSessionTracker.js
Last active July 3, 2017 18:39
Sends events to analytics in timeouts to improve session tracking
window.addEventListener('beforeunload',
function(){
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;
@ValentinFunk
ValentinFunk / sh_jumppack.lua
Last active July 14, 2017 18:34
Jump Pack higher Jumps
ITEM.baseClass = "base_hat"
ITEM.PrintName = "Jump Pack"
ITEM.Description = "Makes you jump higher!"
ITEM.Price = {
points = 1000,
}
ITEM.static.validSlots = {
"Accessory",
}
@ValentinFunk
ValentinFunk / app.component.ts
Last active July 26, 2017 08:02
Angular2 Router Loading Screen
export class AppComponent {
routerLoading$: Observable<boolean>;
constructor(private router: Router) {
this.routerLoading$ = this.router.events.flatMap(event => {
if (event instanceof NavigationStart) {
return [true];
}
if (event instanceof NavigationEnd ||
event instanceof NavigationCancel ||
event instanceof NavigationError) {