This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 syslog | |
maxconn 1000 | |
user haproxy | |
group haproxy | |
daemon | |
defaults | |
log global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
multi_accept on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- According to Heather Champ, former community manager at flickr, | |
you should not allow search engines to index your "Contact Us" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--------------------------------------------------------------------------------------------------- | |
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" %> | |
<script runat="server"> | |
void Page_Load(object sender, System.EventArgs e) | |
{ | |
DotNetNuke.Entities.Users.UserInfo uInfo = | |
DotNetNuke.Entities.Users.UserController.GetUserById(0, 1); | |
if (uInfo != null) | |
{ | |
string password = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var to12Hr = function(n, r /* round to nearest r minutes */) { | |
if (!n || n >= 24) return '12:00 AM'; | |
var m = (Math.round(n%1*(r = (r ? 60/r : 60)))/r)*60; | |
return ((n = (m>59 ? n+1 : n))>=13 ? (n|0)-12 : n|0) + ':' + (m>9 ? (m>59 ? '00' : m) : '0'+m) + (n>=12 && m<60 ? ' PM' : ' AM'); | |
} | |
// to12Hr(6.5) => "6:30 AM" | |
// to12Hr(13.19) => "1:11 PM" | |
// to12Hr(13.19, 15) => "1:15 PM" (rounds to 15 mins) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="windows-1252"?> | |
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<!-- Variable used to fine DNN Manifest File --> | |
<DNNFileName>$(AssemblyName)</DNNFileName> | |
<!--Variable used to create the install and source zip file--> | |
<PackageName>$(AssemblyName)</PackageName> | |
<!-- Variable used to find the location of the DotNetNuke installation bin folder. Used to get the projects binary DLL. | |
Assumes your your project will be stored in a company/module folder. | |
Ex: DesktopModules/CompanyName/ModuleName/--> |
NewerOlder