Skip to content

Instantly share code, notes, and snippets.

Avatar
Go Phillies!

Tim Ski marshyski

Go Phillies!
View GitHub Profile
@marshyski
marshyski / Windows 10 Gaming Performance.md
Last active Nov 10, 2020
Windows 10 Gaming Optimizations
View Windows 10 Gaming Performance.md

Windows 10 Gaming Performance

Tested On: MSI GS66 Stealth 10SFS-037 Laptop | Intel i7-10750H | Nvidia RTX 2070 Super

Date Updated: 28JUN2020

Est. Time to Completion: 1 hour

Expected improvement from stock Windows 10 install for gaming is 1-3x network improvement and reduction in OS overhead.

@heapwolf
heapwolf / policy.md
Last active Apr 12, 2019
Possible start of a strawman for node security policies
View policy.md

A node security policy is similar in concept to a CSP.

~/policy.json

{
  "sha384-...": { // <- this is the hash of a source (which self describes its hashing algorithm)
    fs: [ // <- this is an "entitlement", it's a whitelist (an array of objects)
      {
        path: "/home/alice/**/*", // <- this is a "resource" (a filesystem path)
@edhemphill
edhemphill / fifo.go
Last active Apr 30, 2020
Thread / goroutine safe, batching and blocking FIFO queue in golang
View fifo.go
import (
"net/http"
"sync"
"fmt"
)
type logBuffer struct {
stuff string
}
View glm-bench.py
from distributed import Worker, Scheduler, Client, Nanny
from distributed.client import _wait
from tornado import gen
from tornado.ioloop import IOLoop
loop = IOLoop.current()
s = Scheduler(loop=loop)
s.start(0)
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active Sep 22, 2021
What I Wish I'd Known About Equity Before Joining A Unicorn
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@svett
svett / compress.go
Last active Sep 1, 2021
ZIP archives in Golang
View compress.go
import (
"archive/zip"
"io"
"os"
"path/filepath"
"strings"
)
func zipit(source, target string) error {
zipfile, err := os.Create(target)
@svett
svett / custom_flag.go
Created Jul 6, 2015
Custom flag arguments with flag package in Go
View custom_flag.go
package main
import (
"flag"
"fmt"
"net/url"
"strings"
)
type UrlFlag struct {
@velocity303
velocity303 / winpf.pp
Last active Aug 29, 2015
Windows code snippets for base OS Settings
View winpf.pp
#profile class for https://forge.puppetlabs.com/ptierno/windowspagefile
class profile::winpf {
case $os[release][major] {
"2008 R2": { if $::issql == 'true' {
$initialpf = 24576
$maximumpf = 24576
}
elsif $memorysize_mb < 16384 {
$initialpf = 1024
$maximumpf = 1024
View ec2tags.rb
require 'facter'
require 'aws-sdk'
if Facter.value("ec2_instance_id") != nil
instance_id = Facter.value("ec2_instance_id")
region = Facter.value("ec2_placement_availability_zone")[0..-2]
ec2 = Aws::EC2::Client.new(region:region)
instance = ec2.describe_instances(instance_ids:[instance_id])
tags = instance.reservations[0].instances[0].tags
tags.each do |tag|
@denji
denji / nginx-tuning.md
Last active Sep 24, 2021
NGINX tuning for best performance
View nginx-tuning.md

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.