Skip to content

Instantly share code, notes, and snippets.

View jcoffi's full-sized avatar

Justin Coffi jcoffi

View GitHub Profile
######
To use this class:
Replace self.appkey, userkey, secret, account_number
tradeking = TK.TK()
profit = tradeking.get_profit()
#####
@denji
denji / nginx-tuning.md
Last active July 23, 2024 23:45
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.

Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1
$domain = "mydomain.com"
$certificiatePassword = "abcd1234"
$email = "letsencrypt@mydomain.com"
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $vault
cd $vault
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/
New-ACMERegistration -Contacts mailto:$email
@skochinsky
skochinsky / guids.txt
Created July 4, 2016 16:27
UEFI file/section GUIDs collection
; AMI
[GUID_FILE]
; ACPI tables
16D0A23E-C09C-407d-A14A-AD058FDD0CA1=ACPI
11D8AC35-FB8A-44d1-8D09-0B5606D321B9=DSDT
95DFCAE5-BB28-4d6b-B1E2-3AF3A6BF434F=PTID
FB045DB2-598E-485A-BA30-5D7B1B1BD54D=AOAC
60AC3A8F-4D66-4CD4-895A-C3F06E6665EE=iFfsAcpiTables
5B232086-350A-42c7-A70E-3497B5765D85=OEMSSDT
299141BB-211A-48a5-92C0-6F9A0A3A006E=PPMACPI
@evianzhow
evianzhow / hp_saap_license.txt
Created September 3, 2017 02:11
HP Smart Array Advanced Pack Evaluation License Key
34T62-N84MB-7DQGY-G7XGT-YTQ63
@liuyigh
liuyigh / trialDB.csv
Last active June 14, 2018 16:49
Trialert: Notify You by eMail When Clinical Trial Updates
index name ctID lastUpdate
0 DV281 NCT03326752 November 1, 2017
1 SD101 NCT02521870 December 7, 2017
2 AZD1419 NCT02898662 December 21, 2017
3 SD101+MK1966 NCT02731742 December 11, 2017
@johndstein
johndstein / SamlJitHandler.java
Created January 31, 2018 20:17
Salesforce SAML JIT Handler
// This class provides logic for inbound just-in-time provisioning of single
// sign-on users in your Salesforce organization.
// Here's all the info we're going to have.
//
// Employee Id
// First Name
// Last Name
// Email
// Active Flag
@denji
denji / qcow2vdi.md
Last active March 8, 2024 04:15 — forked from mamonu/qcow2vdi.sh
convert a qcow2 vm to a VirtualBox vm format

VirtualBox command-line interface (VBoxManage) provides an easy way to convert raw disk image to the VDI/VMDK format and otherwise.

Let's assume that we have raw image of the sdb device:

$ sudo dd if=/dev/sdb of=./sdb.raw

To use it with VirtualBox we need to convert it to the VDI format:

$ VBoxManage convertdd sdb.raw sdb.vdi --format VDI