Skip to content

Instantly share code, notes, and snippets.

@boyofgreen
boyofgreen / ifdef.md
Last active May 8, 2018 20:33
#ifDef Windows Live at Build 2018
if (typeof Windows !== 'undefined'&& typeof Windows.Security !== 'undefined' && typeof Windows.Security.Credentials !== 'undefined') {
function UploadCheck() {
var username = "BobBarker" + Math.random();
var keycredentialmanager = Windows.Security.Credentials.KeyCredentialManager;
keycredentialmanager.isSupportedAsync().done(function (result) {
if (result == true) {
var retreivalstatus = keycredentialmanager.openAsync(username).done(function (result) {
@boyofgreen
boyofgreen / notification.js
Last active March 11, 2016 14:22
notification inside a Windows 10 app
if (typeof Windows !== 'undefined'&& typeof Windows.UI !== 'undefined' && typeof Windows.UI.Notifications !== 'undefined') {
// Construct the toast notification content
var toastContent = new Windows.Data.Xml.Dom.XmlDocument();
var toast = toastContent.createElement("toast");
toastContent.appendChild(toast);
var visual = toastContent.createElement("visual");
toast.appendChild(visual);
@boyofgreen
boyofgreen / livetile.js
Last active March 11, 2016 14:23
code to push a live tile in Windows 10
if (typeof Windows !== 'undefined' &&
typeof Windows.UI !== 'undefined' &&
typeof Windows.UI.Notifications !== 'undefined') {
// Construct the tile notification content
var tileContent = new Windows.Data.Xml.Dom.XmlDocument();
var tile = tileContent.createElement("tile");
tileContent.appendChild(tile);
@boyofgreen
boyofgreen / backbutton.js
Last active June 9, 2016 15:55
Back Button All code samples
/**here we are generating a back button in the title bar of the app. it doesn't change the page at all as it is above (or below on phone) the app itself. This is a Windows API ***/
//this is the windows apis for the back button as well as an event handleere for it
var systemNavigationManager = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
var systemNavigation = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
@boyofgreen
boyofgreen / prefix.css
Created April 16, 2012 02:34
HTML5 Hacks 3.0.5
.testClass {
width: 100%;
color: #fff;
transform: rotate(30deg);
-ms-transform: rotate(30deg); /* IE 9 */
-webkit-transform: rotate(30deg); /* all webkit browsers */
-o-transform: rotate(30deg); /* Opera */
-moz-transform: rotate(30deg); /* Firefox */
}
@boyofgreen
boyofgreen / awesome css.css
Created April 14, 2012 17:17
HTML5 Hacks 3.3
p.test{
width: 45px;
padding:5px;
border: 1px solid black;
text-transform: uppercase;
}
@boyofgreen
boyofgreen / collection.css
Created April 11, 2012 03:56
HTML5 Hacks 3.2
@font-face {
font-family: 'Russo One';
font-style: normal;
font-weight: 400;
src: local('Russo One'), local('RussoOne-Regular'), url('http://themes.googleusercontent.com/static/fonts/russoone/v1/RO6e96EC9m6OLO0tr7J3zz8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
}
@font-face {
font-family: 'Trocchi';
font-style: normal;
font-weight: 400;
@boyofgreen
boyofgreen / font import.css
Created April 9, 2012 02:13
HTML5 Hacks 3.1
@font-face {
font-family: 'Radley';
font-style: normal;
font-weight: normal;
src: local('Radley'), url('../fonts/Radley.woff') format('woff');
}
@font-face {
font-family: 'Lovers Quarrel';
font-style: normal;
font-weight: 400;
<table width="100%" border="1">
<tr>
<th>Title</th>
<th>Price</th>
</tr>
<tr id="323">
<td>Google Hacks</td>
<td>FREE</td>
</tr>