Skip to content

Instantly share code, notes, and snippets.

View deluvas's full-sized avatar

Bogdan "Deluvas" Claudiu deluvas

View GitHub Profile
@deluvas
deluvas / HubConnectionExtensions.cs
Created August 27, 2017 08:37
SignalR client connection extensions
using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.AspNet.SignalR.Client;
using Microsoft.AspNet.SignalR.Client.Hubs;
namespace YourNamespace
{
public static class HubConnectionExtensions
{
@deluvas
deluvas / ffmpeg-snippets.sh
Last active August 11, 2017 17:14
ffmpeg snippets
# Cut and convert
ffmpeg -ss 00:00:10 -i "input_file.ext" -t 00:00:05 "output_file.ext"
@deluvas
deluvas / mysoundcloud.js
Last active January 1, 2018 00:31
Making the world a better place by disabling SoundCloud autoplay
// ==UserScript==
// @name mysoundcloud
// @namespace https://github.com/deluvas
// @version 0.1.2
// @description A collection of tweaks to improve the SoundCloud user experience
// @author deluvas
// @match *://soundcloud.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
@deluvas
deluvas / mytube.js
Last active December 6, 2018 22:16
A collection of tweaks to improve the YouTube user experience (greasemonkey)
// ==UserScript==
// @name mytube
// @namespace https://github.com/deluvas
// @version 0.3.0
// @description A collection of tweaks to improve the YouTube user experience
// @author deluvas
// @match *://www.youtube.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
@deluvas
deluvas / dai-4-2-faci-poarta-in-casa
Last active March 22, 2017 09:05
Dai 4-2, faci poarta in casa
$ echo "$(shuf -i 1-6 -n1)-$(shuf -i 1-6 -n1)"
4-2
@deluvas
deluvas / disable-update-notification.bat
Created March 12, 2017 08:57
Disable annoying Windows 10 update notification
REM
REM Run with administrative privileges
REM https://i.stack.imgur.com/t2GQK.png
REM
cd /d "%Windir%\System32"
takeown /F MusNotification.exe
icacls MusNotification.exe /deny Everyone:(X)
takeown /F MusNotificationUx.exe
icacls MusNotificationUx.exe /deny Everyone:(X)
@deluvas
deluvas / Dockerfile
Last active February 25, 2017 18:21
Configure locales in Debian Docker image
FROM debian:jessie
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update \
&& apt-get install -y locales
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
@deluvas
deluvas / gist:d24702ea619e3d77836b
Created December 10, 2015 14:35 — forked from tnolet/gist:7361441
Install collectd 5.4 on Centos 6.x and make it spit out cool metrics. Copied from http://linuxdrops.com/install-collectd-statistics-collecter-on-centos-rhel-ubuntu-debian/ and tweaked for your and my pleasure. For all other cool options, check the provided link.
#!/bin/bash
# Perform installation as root
# Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
# Get Collectd, untar it, make it and install
wget http://collectd.org/files/collectd-5.4.0.tar.gz
tar zxvf collectd-5.4.0.tar.gz
@deluvas
deluvas / mod_fcgid-params.md
Last active September 13, 2020 02:25
mod_fcgid notes

Notable parameters

  • FcgidMaxProcessesPerClass
    • Default: 100
    • Maximum amount of processes per application/website/wrapper.
  • FcgidProcessLifeTime
    • Default: 3600 seconds (0 disables check)
    • Idle processes which have existed for greater than this time will be terminated, if the number of processses for the class exceeds FcgidMinProcessesPerClass.
    • Working processes shall not be terminated.
  • This process lifetime check is performed at the frequency of the configured FcgidIdleScanInterval.
@deluvas
deluvas / mongod.yaml
Created August 19, 2015 12:11
MongoDB Starter Config
systemLog:
destination: file
path: "B:/MongoDB/Server/3.0/data/mongod.log"
logAppend: true
storage:
dbPath: "B:/MongoDB/Server/3.0/data/db"