Skip to content

Instantly share code, notes, and snippets.

View nayosx's full-sized avatar

NayosX Ness nayosx

View GitHub Profile
@nayosx
nayosx / responsive-video.css
Created May 19, 2018 00:02 — forked from jaicab/responsive-video.css
Pure CSS solution for embed videos with an aspect ratio of 16:9
.video-container {
position: relative;
padding-bottom: 56.25%; /*16:9*/
padding-top: 30px;
height: 0;
overflow: hidden;
}
.video-container iframe,
.video-container object,
@nayosx
nayosx / VideoStream.php
Created May 18, 2018 22:42 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@nayosx
nayosx / modal-fullscreen.css
Created April 19, 2018 21:58 — forked from soham2008xyz/modal-fullscreen.css
Bootstrap 3 transparent and fullscreen modals
/* .modal-fullscreen */
.modal-fullscreen {
background: transparent;
}
.modal-fullscreen .modal-content {
background: transparent;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
@nayosx
nayosx / Semi-async Datatable v2.html
Last active March 8, 2017 17:58
Semi-async data from server to Datatable plugins 1.10
<!--
This is a another example when use a Datatable add
-->
<script>
var oTable;
var t_body;
$(function(){
t_body = $('#tabla tbody');
oTable = $("#tabla").DataTable({
'dom': "<'row'<'col-sm-3'l><'col-sm-5'f><'col-sm-4 text-right'B>>"+
@nayosx
nayosx / Semi-async data from server to Datatable v1.html
Last active March 8, 2017 17:58
Semi-async data from server to Datatable plugins 1.10
<!--
this script is a example, not work. But it's good to boot into datatable
-->
<script>
var oTable;
$(function(){
$.ajax({
url: 'url_to_server_get_json',
type: 'get',
dataType: 'json',
@nayosx
nayosx / Install Composer to use MAMP's PHP.md
Last active November 21, 2016 00:12 — forked from kkirsche/Install Composer to use MAMP's PHP.md
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

@nayosx
nayosx / web.config.xml
Last active September 13, 2015 21:06
Register the MySql Data Provider in ASP.NET web.config
<system.data>
<DbProviderFactories>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory,MySql.Data" />
</DbProviderFactories>
</system.data>
@nayosx
nayosx / get_url.js
Created August 20, 2015 23:54
Get params from your HOST via Javascript Obtener parámetros de tu HOST por medio de javascript
var parseUrl = (function () {
var a = document.createElement('a');
return function (url) {
a.href = url;
return {
host: a.host,
hostname: a.hostname,
pathname: a.pathname,
port: a.port,
protocol: a.protocol,
@nayosx
nayosx / index.html
Created August 17, 2015 03:55
Pequeño ejemplo de Datatable el cual se usa en mi blog personal
<table id="table1" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>