- GitHub Staff
- https://www.smockle.com/
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
public class MonthComparer : IComparer<string> { | |
public int Compare(string a, string b) { | |
var c = DateTime.ParseExact(a, "MMMM", CultureInfo.CurrentCulture).Month; | |
var d = DateTime.ParseExact(b, "MMMM", CultureInfo.CurrentCulture).Month; | |
return c - d; | |
} | |
} |
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
/* Add the following to web.config: | |
* <system.webServer> | |
* <staticContent> | |
* <remove fileExtension=".ttf" /> | |
* <mimeMap fileExtension=".ttf" mimeType="application/x-font-ttf" /> | |
* <remove fileExtension=".woff" /> | |
* <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> | |
* <remove fileExtension=".svg" /> | |
* <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> | |
* </staticContent> |
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
ssh -t username@server "/bin/bash -i" |
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
$(function() { | |
// Code here | |
}); |
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
Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop | |
Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop | |
Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop | |
Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard | |
Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard | |
Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard |
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
// <header><img src="<%: Url.Content("~/content/images/header.png") %>" data-message="10110010110000100000010001110100010011101010011001110110011101101000011001000110000001001100111010010110000101100010111000000100101001100010111010000110000101100000010010010010"></header> | |
var __h = $("header img"); | |
var __b = $("body"); | |
if (__h.height() != null && __h.attr("data-message") != "01001001001000000110100001100001011101000110010100100000011101000110100001101001011100110010000001100010011000010110111001101110011001010111001000101110001000000100001101001101".split("").reverse().join("")) { | |
__b.empty(); | |
var __s = "01111100011011101001011000100110111101000011110001111100000011101111010000111100011101000001011011000110101011101011011000000100111011101111011000010110000001001110111011110110011101101101011000000100100100100000010001110100101001101011001001111100000011100011110001111100000011101111010000111100111111001100111011100110011101101001011001001110010001100000010000101110100101100000010001110110 |
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
RouteTable.Routes.MapRoute("SpecificRoute", "{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional }); |
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
/* Submit to Twitter. */ | |
public void Twitter(Post post) { | |
// Get the OAuth params. | |
string status = post.title + " http://blog.smockle.com/" + post.id; | |
string postBody = "status=" + Uri.EscapeDataString(status); | |
string oauth_consumer_key = Properties.Settings.Default.Twitter_Consumer_Key; | |
string oauth_nonce = Convert.ToBase64String(new ASCIIEncoding().GetBytes(DateTime.Now.Ticks.ToString())); | |
string oauth_signature_method = "HMAC-SHA1"; | |
string oauth_token = Properties.Settings.Default.Twitter_Token; |
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
// Delay | |
window.setTimeout(function(){}, 1000); | |
// Loop | |
var l = window.setInterval(function(){}, 1000); | |
window.clearInterval(l); |
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
/* entire container, keeps perspective */ | |
body .flip-container { | |
width: 100%; | |
} | |
body .flip-container .flipper { | |
position: relative; | |
} | |
/* hide back of pane during swap */ |
OlderNewer