This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jquery plugin to fake 'position: sticky' (note: relies on underscore.js for throttling, debouncing and passing in options) | |
(function ($, _) { | |
$.fn.fakeSticky = function (options) { | |
var opts = _.extend({ | |
width_guide_id: 'fake-sticky-width-guide', // This allows the sticky element to support having a % based width value (useful for responsive designs) | |
pin_boundary_offset: 0, // Increase this if you want to prevent the bottom edge of the sticky element getting too close to the bottom edge of its container | |
scroll_throttle_ms: 15, | |
debounce_timer_ms: 25 | |
}, options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am corford on github. | |
* I am charlie (https://keybase.io/charlie) on keybase. | |
* I have the public key with fingerprint 91E0 61BF B958 5886 DB38 59B7 227B 18FB AC14 3C82 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int mingw_lstat(const char *file_name, struct stat *buf) | |
{ | |
WIN32_FILE_ATTRIBUTE_DATA fdata; | |
WIN32_FIND_DATAW findbuf; | |
wchar_t wfilename[MAX_LONG_PATH]; | |
int wlen = xutftowcs_long_path(wfilename, file_name); | |
if (wlen < 0) | |
return -1; | |
/* strip trailing '/', or GetFileAttributes will fail */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist gives you the commands and config necessary to quickly and safely: | |
- Create a Root Certififacte Authority (valid until the year ~2045 and whose key is meant to be stored somewhere secure and hard to get at e.g. on USB key in an off-prem vault) | |
- Create an intermediate sub-root certificate authority (which is used for day to day signing of end-entity certs) | |
- Create an end-entity cert (e.g. for securing nginx/apache) | |
For more background, see: https://developers.yubico.com/PIV/Guides/Certificate_authority.html | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int mingw_lstat(const char *file_name, struct stat *buf) | |
{ | |
WIN32_FILE_ATTRIBUTE_DATA fdata; | |
WIN32_FIND_DATAW findbuf; | |
wchar_t wfilename[MAX_LONG_PATH]; | |
int wlen = xutftowcs_long_path(wfilename, file_name); | |
if (wlen < 0) | |
return -1; | |
/* strip trailing '/', or GetFileAttributes will fail */ |