Skip to content

Instantly share code, notes, and snippets.

View hongz1's full-sized avatar

Jae Hong Lee hongz1

  • @cranesupply
View GitHub Profile
@hongz1
hongz1 / html_email_buttons_1.html
Created January 17, 2017 04:17 — forked from elidickinson/html_email_buttons_1.html
HTML email buttons that work
<div>
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://www.EXAMPLE.com/" style="height:40px;v-text-anchor:middle;width:300px;" arcsize="10%" stroke="f" fillcolor="#d62828">
<w:anchorlock/>
<center style="color:#ffffff;font-family:sans-serif;font-size:16px;font-weight:bold;">
Button Text Here!
</center>
</v:roundrect>
<![endif]-->
<![if !mso]>
@hongz1
hongz1 / last_business_day_of_month.js
Created December 9, 2016 18:11 — forked from arch1t3ct/last_business_day_of_month.js
Javascript (Node.js) function for getting last working/business day of the month.
/**
* Finds last working/business day of the month.
*
* Not tested for cross-browser compability. Works in Node.js though.
*
* EXAMPLES:
*
* 1. Returns last day of the last month of the current year:
*
* var result = lastBusinessDayOfMonth();
@hongz1
hongz1 / pfxtosnk.cs
Created December 7, 2016 21:39 — forked from baywet/pfxtosnk.cs
sample on how to convert a pfx to snk visual studio assembly signing certificate
X509Certificate2 cert = new X509Certificate2(@"KEY.pfx", "pfxPassword", X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
RSACryptoServiceProvider provider = (RSACryptoServiceProvider) cert.PrivateKey;
byte[] array = provider.ExportCspBlob(!provider.PublicOnly);
using (FileStream fs = new FileStream("FileName.snk", FileMode.Create, FileAccess.Write))
{
fs.Write(array, 0, array.Length);
}
@hongz1
hongz1 / SingleItemNewsTemplate.ascx
Created August 9, 2016 17:18 — forked from jonathanread/SingleItemNewsTemplate.ascx
Helper class for incrementing the ViewsCount property of News & Blogs in Sitefinity. This allows one increment per article or post per Session. Also disables incrementing during editing, etc.
<%@ Control Language="C#" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit"
Assembly="Telerik.Sitefinity" %>
<%@ Register Assembly="Telerik.Sitefinity.ContentModules" Namespace="Telerik.Sitefinity.Modules.News.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Comments.Web.UI.Frontend" TagPrefix="comments" %>
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@hongz1
hongz1 / setIntervalSynchronous.js
Last active August 26, 2015 12:17 — forked from AndersDJohnson/setIntervalSynchronous.js
A synchronous version of setInterval (functional form). Waits for the interval function to finish before starting the timeout to the next call.
var setIntervalSynchronous = function (func, delay) {
var intervalFunction, timeoutId, clear;
// Call to clear the interval.
clear = function () {
clearTimeout(timeoutId);
};
intervalFunction = function () {
func();
timeoutId = setTimeout(intervalFunction, delay);
}
@hongz1
hongz1 / nodejs
Last active August 29, 2015 14:21
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"
@hongz1
hongz1 / 0_reuse_code.js
Created April 27, 2014 21:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console