Skip to content

Instantly share code, notes, and snippets.

@uxcotulat
uxcotulat / laravel_conditional_index_migration.php
Created June 14, 2019 10:23 — forked from Razoxane/laravel_conditional_index_migration.php
Laravel - Create Index If Not Exists / Drop Index If Exists
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class LaravelConditionalIndexMigration extends Migration
{
/**
* Run the migrations.
@uxcotulat
uxcotulat / .block
Created October 10, 2016 08:55 — forked from mbostock/.block
Canvas Geometric Zooming
license: gpl-3.0
/*Loading Bars
The loading bars spinner is probably the most common loading spinner you will see, it is made up of 8 lines which spin together in a circle, each of the lines will have different opacity. The spinning effect will come from changing the opacity of each of the loading bars, making it look like the entire thing is spinning.
The HTML
First we start off by creating the HTML for the spinner, all you have to do create a parent element with 8 child elements.*/
<div class="loading bar">
@uxcotulat
uxcotulat / sort1mb.cpp
Created January 21, 2016 11:07 — forked from preshing/sort1mb.cpp
Sort one million 8-digit numbers in 1MB RAM
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef unsigned int u32;
typedef unsigned long long u64;
//-------------------------------------------------------------------------
// WorkArea
//-------------------------------------------------------------------------