Skip to content

Instantly share code, notes, and snippets.

View skhani's full-sized avatar

Shahin Khani skhani

  • UTA
  • United States
View GitHub Profile
<?php
// Brightcove sample for MRSS feed
// This is just a sample to get you started. You can customize further as your requirements
// grow.
// The following is a list of requirements and conditions in order for this podcast feed
// to function properly;
// 1) You must have a Pro or Enterprise level Video Cloud Account.
// 2) You will need to contact Brightcove Support to request an API READ Token with URL
// access, if you don't have one already.
@skhani
skhani / UUID.php
Last active August 29, 2015 14:07 — forked from dahnielson/UUID.php
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
<?php
// Brightcove sample for MRSS feed
// This is just a sample to get you started. You can customize further as your requirements
// grow.
// The following is a list of requirements and conditions in order for this podcast feed
// to function properly;
// 1) You must have a Pro or Enterprise level Video Cloud Account.
// 2) You will need to contact Brightcove Support to request an API READ Token with URL
// access, if you don't have one already.
@skhani
skhani / UUID.php
Last active August 29, 2015 14:16 — forked from dahnielson/UUID.php
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
#!/bin/bash
# author: Jean-François Lépine
# Ruby
# -----------------------
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm reload
rvm install 2.1.0
#!/bin/sh
if [ $# -ne 1 ]; then
echo "$0 <git-commit>" 1>&2
exit 1
fi
git diff --name-status $1
read -p "Press any key to execute..."
@skhani
skhani / readme.md
Last active January 27, 2019 07:08 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@skhani
skhani / class.database.php
Last active August 29, 2015 14:25 — forked from jonashansen229/class.database.php
PHP OOP Database class using MySQLI and Singleton pattern. Only one instance of the class will be made, this requires less memory.
<?php
/*
* Mysql database class - only one connection alowed
*/
class Database {
private $_connection;
private static $_instance; //The single instance
private $_host = "HOSTt";
private $_username = "USERNAME";
private $_password = "PASSWORd";
@skhani
skhani / php-html-css-js-minifier.php
Last active October 31, 2021 06:43 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {