Skip to content

Instantly share code, notes, and snippets.

View assembledadam's full-sized avatar
⚒️
Working on Claimer.com

Adam McCann assembledadam

⚒️
Working on Claimer.com
View GitHub Profile
@gene1wood
gene1wood / aws_assume_role
Last active May 17, 2022 16:40
Workaround AWS CLI lack of support for IAM assume-role
#!/bin/bash
usage () {
cat <<DOCUMENTATIONXX
Usage : . $0 ROLE_ARN [PARENT_PROFILE_NAME]
^--- Note that this script must be sourced not executed
This tool will generate temporary credentials for an assumed role, save
those ephemeral credentials in the awscli config and set the alias of
"aaws" to use this new ephemeral awscli profile
@mmcc
mmcc / b2dntp
Created September 11, 2014 16:49
boot2docker NTP update
#!/bin/sh
# Fix NTP/Time
# https://github.com/boot2docker/boot2docker/issues/290
boot2docker ssh -- sudo killall -9 ntpd
boot2docker ssh -- sudo ntpclient -s -h pool.ntp.org
boot2docker ssh -- sudo ntpd -p pool.ntp.org
@denji
denji / nginx-tuning.md
Last active May 3, 2024 03:57
NGINX tuning for best performance

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.

@atenni
atenni / README.md
Last active April 24, 2024 01:36
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@nrrrdcore
nrrrdcore / inset_input.css
Created August 9, 2012 23:35
The Perfect Inset Input CSS
input {
height: 34px;
width: 100%;
border-radius: 3px;
border: 1px solid transparent;
border-top: none;
border-bottom: 1px solid #DDD;
box-shadow: inset 0 1px 2px rgba(0,0,0,.39), 0 -1px 1px #FFF, 0 1px 0 #FFF;
}