Skip to content

Instantly share code, notes, and snippets.

View zendbit's full-sized avatar

Amru Rosyada zendbit

  • Zendbit
  • Yogyakarta
View GitHub Profile
@zendbit
zendbit / userChrome.css
Created June 28, 2023 12:25
Hide Firefox Panel Using userChrome.css
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#navigator-toolbox {
height: 0px !important;
min-height: 0px !important;
overflow: hidden !important;
}
#navigator-toolbox:focus,
#navigator-toolbox:focus-within,
@zendbit
zendbit / fdb_c_api.c
Created June 18, 2022 16:19 — forked from ThatWilsonNerd/fdb_c_api.c
FoundationDB C API Example
#define FDB_API_VERSION 20
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include "foundationdb/fdb_c.h"
void checkError(fdb_error_t errorNum)
{
@zendbit
zendbit / server_certificates_to_pem.md
Created February 16, 2021 02:04 — forked from stevenhaddox/server_certificates_to_pem.md
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample

@zendbit
zendbit / exif.js
Last active August 28, 2015 06:57 — forked from christopherdebeer/exif.js
/*
* Javascript EXIF Reader 0.1.4
* Copyright (c) 2008 Jacob Seidelin, cupboy@gmail.com, http://blog.nihilogic.dk/
* Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]
*/
var EXIF = {};
(function() {
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',