Skip to content

Instantly share code, notes, and snippets.

View icron's full-sized avatar

Alexander L. icron

  • Cyprus
View GitHub Profile
@merkushin
merkushin / mysql_uuid.sql
Last active October 15, 2023 14:06
MySQL UUID v5 Stored Functions
DROP FUNCTION IF EXISTS uuid_from_bin;
DROP FUNCTION IF EXISTS uuid_to_bin;
DROP FUNCTION IF EXISTS uuid_v5;
DROP FUNCTION IF EXISTS uuid_v4;
DELIMITER //
CREATE FUNCTION uuid_from_bin(b BINARY(16))
RETURNS CHAR(36)
BEGIN
@kingkool68
kingkool68 / index.js
Created November 14, 2017 18:33
AWS Lambda Function for Proxying Requests to S3
/**
* This is a simple AWS Lambda function that will look for a given file on S3 and return it
* passing along all of the headers of the S3 file. To make this available via a URL use
* API Gateway with an AWS Lambda Proxy Integration.
*
* Set the S3_REGION and S3_BUCKET global parameters in AWS Lambda
* Make sure the Lambda function is passed an object with `{ pathParameters : { proxy: 'path/to/file.jpg' } }` set
*/
var AWS = require('aws-sdk');
@icron
icron / vpn.sh
Created December 27, 2014 17:27
Build your VPN in one click
#!/bin/bash
echo "Select on option:"
echo "1) Set up new PoPToP server AND create one user"
echo "2) Create additional users"
read x
if test $x -eq 1; then
echo "Enter username that you want to create (eg. client1 or john):"
read u
echo "Specify password that you want the server to use:"
read p