Skip to content

Instantly share code, notes, and snippets.

@harshavardhana
harshavardhana / nginx-minio-static.md
Last active May 13, 2024 15:03 — forked from koolhead17/gist:4b8dd8d95ec86368634693cf9ad9391c
How to configure static website using Nginx with MinIO ?

How to configure static website using Nginx with MinIO ?

1. Install nginx

2. Install minio

3. Install mc client

4. Create a bucket:

$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
@denvers
denvers / User.php
Last active August 29, 2015 13:59
Laravel upgrade to 4.1.26
<?php
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableInterface;
use \Eloquent;
class User extends Eloquent implements UserInterface, RemindableInterface
{
@leocavalcante
leocavalcante / eloquent_example.php
Last active December 17, 2015 02:48
Laravel 4 - Eager Load Constraints
<?php
Quota::with(
array(
'codes' => function($query) {
$query->where('number', '=', 11);
}
)
)
->where('label', '=', 'foo')
// Usage : less2stylusDir('../src/css/');
var fs = require('fs');
// this less 2 stylus conversion script make a stylus easy to read syntax
// - let the braces
// - replace the @ for var as $
// - let semicolons
function less2stylus(less)
@rjz
rjz / cs-jq-plugin-template.coffee
Created September 3, 2012 17:01
Coffeescript jQuery Plugin Class Template
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
@cstrahan
cstrahan / FirewallHelper.cs
Created August 8, 2010 09:09
C# Firewall helper
///
/// Allows basic access to the windows firewall API.
/// This can be used to add an exception to the windows firewall
/// exceptions list, so that our programs can continue to run merrily
/// even when nasty windows firewall is running.
///
/// Please note: It is not enforced here, but it might be a good idea
/// to actually prompt the user before messing with their firewall settings,
/// just as a matter of politeness.
///