Skip to content

Instantly share code, notes, and snippets.

View tanordheim's full-sized avatar

Trond Nordheim tanordheim

View GitHub Profile
View resource.json
{
"id": 31337,
"title": "ACME Corp",
"_links": {
"employees": {
"href": "/companies/31337/employees",
"count": 42
}
}
}
@tanordheim
tanordheim / MainView.ux
Last active September 6, 2017 14:56
Font-Awesome in Fuse
View MainView.ux
<App Theme="Basic">
<!-- Declare the Icon font (place in ./fonts folder) -->
<Font File="fonts/fontawesome-webfont.ttf" ux:Global="fa" />
<!-- Example of usage -->
<fa-upload FontSize="50" />
</App>
View app.js
angular.module("app").controller("AppCtrl", function($scope, $http, $window, configuration, currentUserFactory, authService) {
$scope.config = configuration;
$scope.$on("event:auth-loginRequired", function() {
$http.post("/auth/refresh").then(function(response) {
authService.loginConfirmed();
}, function(response) {
$window.location.href = "/auth/logged_out";
});
});
});
View DeployAzureWebsite.ps1
param (
[Parameter(Position = 0, Mandatory=$True)]
[string]$ProjectName,
[Parameter(Position = 1, Mandatory=$True)]
[string]$SiteName,
[Parameter(Position = 2, Mandatory=$True)]
[string]$Environment
)
View result.html
table>
<tr>
<td>
This is a cell containing code.
<code>uno
public void Foo {}</code>
<code>uxl
&lt;Scene /&gt;</code>
</td>
View gitconfig
[core]
excludesfile = ~/.gitignore
[diff]
[color]
ui = auto
[alias]
st = status
ci = commit
co = checkout
di = diff
View infocmp-l.txt
# Reconstructed via infocmp from file: /usr/share/terminfo/78/xterm-256color
xterm-256color|xterm with 256 colors,
auto_right_margin, back_color_erase,
backspaces_with_bs, can_change, eat_newline_glitch,
has_meta_key, move_insert_mode, move_standout_mode,
no_pad_char, prtr_silent,
columns#80, init_tabs#8, lines#24, max_colors#256,
max_pairs#32767,
acs_chars=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
back_tab=\E[Z, bell=^G, carriage_return=^M,
View infocmp.txt
Reconstructed via infocmp from file: /usr/share/terminfo/78/xterm-256color
xterm-256color|xterm with 256 colors,
am, bce, ccc, km, mc5i, mir, msgr, npc, xenl,
colors#256, cols#80, it#8, lines#24, pairs#32767,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
@tanordheim
tanordheim / desaturate.css
Created May 6, 2013 07:50
desaturate.css
View desaturate.css
.desaturate {
filter: url("data:image/svg+xml;utf8,<svg%20xmlns='http://www.w3.org/2000/svg'><filter%20id='grayscale'><feColorMatrix%20type='matrix'%20values='0.3333%200.3333%200.3333%200%200%200.3333%200.3333%200.3333%200%200%200.3333%200.3333%200.3333%200%200%200%200%200%201%200'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
filter: gray; /* IE6+ */
filter: grayscale(100%); /* Current draft standard */
-webkit-filter: grayscale(100%); /* New WebKit */
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
}
View chef.rb
["command1", "command2", "command3"].each do |command|
execute command do
not_if { File.directory?("/usr/bin") }
end
end