Skip to content

Instantly share code, notes, and snippets.

@devfred
devfred / gist:9802185560e9b0836a12fe8c8e158cf1
Created August 9, 2020 19:29 — forked from metavida/gist:601087
How to retrieve a Report record via the Haiku LMS API, using C#.
// Based on code from the following sources:
// * http://www.voiceoftech.com/swhitley/index.php/2009/03/twitter-oauth-with-net/
// * http://oauth.googlecode.com/svn/code/csharp/
// Note: if you're using mono the following command will compile this code `gmcs -r:System.Web.dll this_file.cs`
using System;
using System.Security.Cryptography;
using System.Collections.Generic;
using System.Text;
using System.Net;
@devfred
devfred / nginx.conf
Created November 16, 2016 08:56 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@devfred
devfred / haproxy.cfg
Created November 16, 2016 07:32 — forked from patmandenver/haproxy.cfg
haproxy with letsencrypt forwarding
global
log 127.0.0.1 syslog
maxconn 1000
user haproxy
group haproxy
daemon
defaults
log global
@devfred
devfred / nginx.conf
Created November 16, 2016 07:29 — forked from patmandenver/nginx.conf
nginx letsencrypt file
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
multi_accept on;
@devfred
devfred / view.ascx
Created October 22, 2015 20:57 — forked from SCullman/view.ascx
DNN, ko and localization
<script>
var resources = <%=Resources%>;
var viewModel = {localize:resources};
ko.applyBindings(viewModel);
</script>
<span data-bind="text:localize.Message"></span>
<span data-bind="text:localize.Message_Help"></span>

Install Laravel 5 through Composer

First install Composer, then:

$ composer create-project laravel/laravel <project-name>

After that we can start a webserver, and test the default index page:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@devfred
devfred / IIS-ReWrite-Remove-ASPX.xml
Created April 15, 2014 15:02 — forked from jsheely/IIS-ReWrite-Remove-ASPX.xml
IIS-ReWrite-Remove-ASPX.xml
<rule name="san aspx">
<!--Removes the .aspx extension for all pages.-->
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}.aspx" />
</rule>
@devfred
devfred / 01_sassygrid.scss
Created December 14, 2013 20:34 — forked from matthewcopeland/01_sassygrid.scss
01_sassygrid.scss
//---------------------------------------------------------------------------------------------------
// a sassier grid for spree
// fixed-width - html whitespace not removed.
// intended to be used as magic-classes, coupling markup&style.
// based on skeleton v1.1 by dave gamache - thanks dude
//
//---------------------------------------------------------------------------------------------------
//- Contents
//--- Grid classes
//--- Grid Variables
@devfred
devfred / example.html
Created May 21, 2013 15:53 — forked from joelnet/example.html
javascript: Unobtrusive knockout example
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}