Skip to content

Instantly share code, notes, and snippets.

View kunagpal's full-sized avatar
🎯
Focusing

Kunal Nagpal kunagpal

🎯
Focusing
View GitHub Profile
@64
64 / 1_0_1-openssl-err.rs
Last active January 29, 2024 02:56
OpenSSL error reason and function codes
// Generated by https://gist.github.com/64/8ac13019f4faa491018aab6b5c265141
extern crate libc;
use libc::c_int;
pub const AEPHK_F_AEP_CTRL: c_int = 100;
pub const AEPHK_F_AEP_FINISH: c_int = 101;
pub const AEPHK_F_AEP_GET_CONNECTION: c_int = 102;
pub const AEPHK_F_AEP_INIT: c_int = 103;
pub const AEPHK_F_AEP_MOD_EXP: c_int = 104;
pub const AEPHK_F_AEP_MOD_EXP_CRT: c_int = 105;
echo-server-epoll
echo-server-poll
talk
talk.dSYM
@magnetikonline
magnetikonline / README.md
Last active June 7, 2023 20:57
AWS Elastic Beanstalk deploy user restricted IAM policy.

AWS Elastic Beanstalk deploy user restricted IAM policy

An IAM user policy document to give minimal rights for deploying an Elastic Beanstalk application.

Where:

  • REGION: AWS region.
  • ACCOUNT_ID: AWS account ID.
  • APPLICATION_NAME: Desired target Elastic Beanstalk application name(space).
  • IAM_INSTANCE_PROFILE_ROLE: The instance profile (IAM role) Elastic Beanstalk EC2 instaces will run under.
@springmeyer
springmeyer / bench.js
Created March 20, 2015 18:43
benchmark.js example: testing an async function
'use strict';
var path = require('path');
var fontnik = require('../');
var Benchmark = require('benchmark');
var opensans = path.resolve(__dirname + '/../fonts/open-sans/OpenSans-Regular.ttf');
var suite = new Benchmark.Suite();
@willurd
willurd / web-servers.md
Last active May 24, 2024 13:07
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@benders
benders / index-usage.sql
Created May 19, 2009 18:31 — forked from gnarg/gist:114268
Finds unused indexes in a mysql database
// Finds unused indexes in a mysql database
SELECT
t.TABLE_SCHEMA,
t.TABLE_NAME,
s.INDEX_NAME,
s.COLUMN_NAME,
s.SEQ_IN_INDEX,
( SELECT MAX(SEQ_IN_INDEX)
FROM INFORMATION_SCHEMA.STATISTICS s2