Skip to content

Instantly share code, notes, and snippets.

View alxhotel's full-sized avatar
✍️
Work in progress

Alex alxhotel

✍️
Work in progress
View GitHub Profile
@alxhotel
alxhotel / install_openssl.sh
Last active July 28, 2019 12:27
Install Latest OpenSSL
#!/bin/sh
LATEST_VERSION="openssl-1.1.1c"
# Get latest version
curl https://www.openssl.org/source/${LATEST_VERSION}.tar.gz --output ${LATEST_VERSION}.tar.gz
tar xvf ${LATEST_VERSION}.tar.gz
# Go into the project
cd ${LATEST_VERSION}
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="old@email.here"
CORRECT_NAME="CORRECT_NAME_HERE"
CORRECT_EMAIL="correct@email.here"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@alxhotel
alxhotel / gist:8366f6a20cd944db1a40
Last active September 2, 2015 22:16 — forked from codler/gist:3906826
Support HTTP Header Range, mp4, php.php/mp4.mp4
<?php
# Nginx don't have PATH_INFO
if (!isset($_SERVER['PATH_INFO'])) {
$_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"]));
}
$request = substr($_SERVER['PATH_INFO'], 1);
$file = $request;
$fp = @fopen($file, 'rb');
@alxhotel
alxhotel / country_code_ISO.sql
Last active July 18, 2016 19:46
Country Code ISO SQL
INSERT INTO `country` (`id`, `name`) VALUES ('AF', 'Afghanistan');
INSERT INTO `country` (`id`, `name`) VALUES ('AX', 'Åland Islands');
INSERT INTO `country` (`id`, `name`) VALUES ('AL', 'Albania');
INSERT INTO `country` (`id`, `name`) VALUES ('DZ', 'Algeria');
INSERT INTO `country` (`id`, `name`) VALUES ('AS', 'American Samoa');
INSERT INTO `country` (`id`, `name`) VALUES ('AD', 'Andorra');
INSERT INTO `country` (`id`, `name`) VALUES ('AO', 'Angola');
INSERT INTO `country` (`id`, `name`) VALUES ('AI', 'Anguilla');
INSERT INTO `country` (`id`, `name`) VALUES ('AQ', 'Antarctica');
INSERT INTO `country` (`id`, `name`) VALUES ('AG', 'Antigua and Barbuda');

Keybase proof

I hereby claim:

  • I am alxhotel on github.
  • I am ax (https://keybase.io/ax) on keybase.
  • I have a public key whose fingerprint is ADF9 27F8 23FC A514 998D 6A95 54AA 53C0 3634 C1C9

To claim this, I am signing this object: