Skip to content

Instantly share code, notes, and snippets.

View geomorillo's full-sized avatar

Jhobanny Morillo geomorillo

  • Neptuno
  • Colombia
View GitHub Profile
@geomorillo
geomorillo / code-1.htm
Created May 14, 2019 18:48 — forked from bennadel/code-1.htm
Creating An Image Zoom And Clip Effect With jQuery
<!DOCTYPE HTML>
<html>
<head>
<title>Image Zoom With jQuery</title>
<style type="text/css">
#view {
border: 1px solid #333333 ;
overflow: hidden ;
position: relative ;
@geomorillo
geomorillo / self-signed-certificate-with-custom-ca.md
Created December 17, 2018 21:28 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@geomorillo
geomorillo / halt_compiler.php
Created September 28, 2018 03:43 — forked from ziadoz/halt_compiler.php
Using PHP Halt Compiler
<?php
/**
* The __halt_compiler() function will stop the PHP compiler when called.
* You can then use the __COMPILER_HALT_OFFSET__ constant to grab the contents of the PHP file after the halt.
* In this example a PHP template is stored after the halt, to allow simple separation of logic from templating.
* The template is stored in a temporary file so it can be included and parsed.
*
* See: https://github.com/bobthecow/mustache.php/blob/dev/src/Mustache/Loader/InlineLoader.php
* http://php.net/manual/en/function.halt-compiler.php
*/
@geomorillo
geomorillo / SQLite-PHP-quickstart.php
Created September 18, 2018 14:36 — forked from bladeSk/SQLite-PHP-quickstart.php
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
@geomorillo
geomorillo / JS: cloneObject
Created June 5, 2017 20:25 — forked from KrystianP/JS: cloneObject
Clone obj in js
function clone(obj) {
if (null == obj || "object" != typeof obj) return obj;
var copy = new obj.constructor();
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];
}
return copy;
}
@geomorillo
geomorillo / LdapConnect.cs
Created April 19, 2017 17:56 — forked from dzitkowskik/LdapConnect.cs
How to authenticate user in Ldap / OpenLdap using C# (user: test in domain ghashd.servebeer.com, server on ip 192.168.0.12 port 389)
using System;
using System.Net;
using System.DirectoryServices;
using System.DirectoryServices.Protocols;
using System.Security.Permissions;
namespace LdapConnection
{
[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
public class LdapConnect
@geomorillo
geomorillo / LdapConnect.cs
Created April 19, 2017 17:56 — forked from dzitkowskik/LdapConnect.cs
How to authenticate user in Ldap / OpenLdap using C# (user: test in domain ghashd.servebeer.com, server on ip 192.168.0.12 port 389)
using System;
using System.Net;
using System.DirectoryServices;
using System.DirectoryServices.Protocols;
using System.Security.Permissions;
namespace LdapConnection
{
[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
public class LdapConnect
@geomorillo
geomorillo / gist:cf3eb18b060859c7822ede5c09a07c2d
Created November 23, 2016 18:16 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>