Skip to content

Instantly share code, notes, and snippets.

View wallymathieu's full-sized avatar

Oskar Gewalli wallymathieu

View GitHub Profile
@wallymathieu
wallymathieu / rakefile.rb
Created August 26, 2015 08:15
Howto add links from one projects files into another project
require 'visual_studio_files' # https://rubygems.org/gems/visual_studio_files
desc "regenerate links in project X"
task :regen_links do
project_y = VisualStudioFiles::CsProj.new(File.open(File.join($dir,'ProjectY','ProjectY.csproj'), "r").read)
project_y_files = v.files.select do |file|
file.type=='Compile' && !file.file.end_with?('AssemblyInfo.cs')
end
project_x = VisualStudioFiles::CsProj.new(File.open(File.join($dir,'ProjectX','ProjectX.csproj'), "r").read)
project_x.clear_links
@wallymathieu
wallymathieu / Vagrantfile
Last active August 29, 2015 13:57 — forked from tvjames/Vagrantfile
Vagrant - windows
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@wallymathieu
wallymathieu / test.txt
Created April 3, 2014 11:45
Test gist
1
2
3
öäå
@wallymathieu
wallymathieu / exec.py
Created October 9, 2014 08:54
exec.py in sublime text 2
# Set temporary PATH to locate executable in arg_list
if path:
old_path = os.environ["PATH"]
# The user decides in the build system whether he wants to append $PATH
# or tuck it at the front: "$PATH;C:\\new\\path", "C:\\new\\path;$PATH"
os.environ["PATH"] = ";".join( map(lambda p:p.encode(sys.getfilesystemencoding()), os.path.expandvars(path)))
@wallymathieu
wallymathieu / ToShowOnBigScreenController.cs
Created October 30, 2014 08:00
Resharper reports that apikey is not used ...
[HttpGet]
public JsonResult ShowMetricsForApplication(string apikey, DateTime from, DateTime to)
{
if (!ApiKeys.IsValid(apikey)) throw new UnauthorizedAccessException();
@wallymathieu
wallymathieu / powershell.cmd
Created November 18, 2014 16:20
Start Powershell with github git
%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe -NoExit -ExecutionPolicy Unrestricted -command "& %USERPROFILE%\AppData\Local\GitHub\shell.ps1"
@wallymathieu
wallymathieu / xml_to_html.xsl
Created January 28, 2015 20:32
xml to html xslt
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0" xmlns="http://www.w3.org/TR/REC-html40"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--Licensed under the new BSD License.-->
<xsl:output encoding="utf-8" indent="yes" method="html" omit-xml-declaration="yes"/>
<xsl:template match="node()">
<table>
<tr>
<th>
;
; "CMD Prompt Here" PowerToy
;
; Copyright 1996 Microsoft Corporation
;
; Modified to launch VS.NET 2005 command prompt 5/6/03 MG
[version]
signature="$CHICAGO$"
@wallymathieu
wallymathieu / xml_html_tables.xsl
Last active August 29, 2015 14:14
xml to html tables
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/TR/REC-html40" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--Licensed under the new BSD License.-->
<xsl:output encoding="utf-8" indent="yes" method="html" omit-xml-declaration="yes"/>
<xsl:template match="/">
<html>
<head>
<style type="text/css">table{
border-collapse: collapse;
border: 1px solid black;