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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
handlebars: { | |
compile: { | |
src: 'templates/*.handlebars', | |
dest: 'scripts/handlebars-templates.js' | |
} |
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 ($j) { | |
"use strict"; | |
var app = { | |
query: 'https://api.github.com/users/chris-brown/repos', | |
containerId: '#container', | |
init: function(){ |
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> | |
<html> | |
<head> | |
<title>My demo</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script type="text/javascript" src="scripts/handlebars.runtime.min.js"></script> | |
<script type="text/javascript" src="scripts/handlebars-templates.js"></script> | |
<script type="text/javascript" src="app.js"></script> | |
</head> | |
<body> |
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
GO | |
DECLARE @tableName VARCHAR(MAX) | |
SELECT @tableName = COALESCE(@tableName + ',' ,'') + Name | |
FROM sys.tables | |
SELECT @tableName | |
GO |
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 http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(1337, '127.0.0.1'); | |
console.log('Server running at http://127.0.0.1:1337/'); |
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
using (WebApp.Start<Startup>("http://localhost:1234")) | |
{ | |
Console.WriteLine("Listening on port: 1234"); | |
Console.ReadLine(); | |
} |
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
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | |
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp50</s:String> | |
</wpf:ResourceDictionary> |
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
# Dev Cheat sheet | |
> Just a dumping groud to store useful things. | |
### git alias's | |
1. deletes all local merged branches | |
`[alias] | |
dd = "!git branch -d $(git branch --merged | grep -v master | tr -d ' ')" | |
dc = "!git branch --merged | grep -v master | tr -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
import styled from 'styled-components'; | |
const MyComponent = styled.div` | |
background: red; | |
color: white; | |
`; | |
MyComponent.displayName = 'MyComponent'; | |
const ThemeMyComponent = styled(MyComponent).attrs({ |
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
registry='https://docker-registry.laterooms.io:5000' | |
names='tlrg/logstash-hra-pipe' | |
for name in ${names}; do for n in $( | |
for p in $(curl -sSL "${registry}/v2/${name}/tags/list" | jq -r '.tags[]'); do | |
curl -sSL -I \ | |
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ | |
"${registry}/v2/${name}/manifests/${p}" \ | |
| awk '$1 == "docker-content-digest:" { print $2 }' \ | |
| tr -d $'\r' |
OlderNewer