Skip to content

Instantly share code, notes, and snippets.

View ckwanted's full-sized avatar
🎯
Focusing

Mario Peñate Fariñas ckwanted

🎯
Focusing
View GitHub Profile
@tuto1902
tuto1902 / ext-xdebug.ini
Created April 24, 2021 19:46
XDebug configuration file
[xdebug]
xdebug.start_with_request=yes
xdebug.discover_client_host=true
xdebug.max_nesting_level=256
xdebug.remote_handler=dbgp
xdebug.client_port=9000
xdebug.idekey=VSCODE
xdebug.mode=debug
xdebug.client_host=host.docker.internal
(function(document) {
var json = document.getElementsByTagName('pre')[0].innerText
var obj = JSON.parse(json)
var cards = obj.cards
var output = 0
cards.map(function(card, index) {
var pre = card.name.indexOf('[') + 1
var post = card.name.indexOf(']')
var value = card.name.substring(pre, post)
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@sergiodxa
sergiodxa / saga-example.js
Last active June 27, 2018 20:18
Ejemplo de redux-saga y prueba de un método `createSaga` similar a `createReducer` de redux-duck
import {
applyMiddleware,
createStore,
} from 'redux';
import createSagaMiddleware, {
takeEvery,
takeLatest,
} from 'redux-saga';
import { call, put } from 'redux-saga/effects';
@joshuadutton
joshuadutton / CollectionViewCellConfigurable.swift
Last active February 15, 2022 10:52
Generic Collection View and Table View data sources in Swift
import UIKit
protocol CollectionViewCellConfigurable {
typealias ItemType
typealias CellType: UICollectionViewCell
static func reuseIdentifierForIndexPath(indexPath: NSIndexPath) -> String
static func configureCellAtIndexPath(indexPath: NSIndexPath, item: ItemType, cell: CellType)
}
@michaelgmcd
michaelgmcd / Nav.js
Created August 10, 2015 22:04
Sticky navbar in React.js
var React = require('react');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var cx = require('classnames');
var Nav = React.createClass({
componentDidMount: function() {
if (ExecutionEnvironment.canUseDOM) {
window.addEventListener('scroll', this.handleScroll, false);
}
},
@theRemix
theRemix / exercise.md
Created July 26, 2015 02:25
MongoDB Practice

MongoDB Practice

MongoDB Exercise in mongo shell

Connect to a running mongo instance, use a database named mongo_practice.

Document all your queries in a javascript file to use as a reference.

Insert Documents

<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@vluzrmos
vluzrmos / App_Http_VideoStream.php
Last active June 6, 2024 17:22
Laravel VideoStream.
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/