Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
@kevinblake
kevinblake / run.bat
Created December 10, 2012 09:53
Run .NET solution without Visual Studio
SET PORT=8086
SET SOLUTIONNAME=VS.Solution.Filename.sln
SET WEBDIRECTORY=VS.Solution.Web.WorkingDirectory
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild %CD%\%SOLUTIONNAME%
start "IIS Express %PORT% (%SOLUTIONNAME%)" "%PROGRAMFILES%\IIS Express\iisexpress" /path:%CD%\%WEBDIRECTORY% /port:%PORT%
start "" "http://localhost:%PORT%/"
@davidwhitney
davidwhitney / TypeParsingExtensions
Created January 11, 2013 17:14
A simpler way to parse strings in C# Parsing strings in C# can be verbose and horrible. The last thing you want to do when solving some real problem, is end up with a load of code extracting values from strings and marshalling them between data types. It’s silly, so lets not do it! Instead, I offer you an extension method and some tests. Do with…
public class StringParsingNeedsToBeSimpler
{
public void HereAreSomeExamples()
{
//You know what sucks?
string value = "123";
int outt;
if(!int.TryParse(value, out outt))
{
outt = 12345; // my default!
@evansneath
evansneath / Python3 Virtualenv Setup
Last active March 7, 2022 16:31
Setting up and using Python3 Virtualenv
To install virtualenv via pip
$ pip3 install virtualenv
Note that virtualenv installs to the python3 directory. For me it's:
$ /usr/local/share/python3/virtualenv
Create a virtualenvs directory to store all virtual environments
$ mkdir somewhere/virtualenvs
Make a new virtual environment with no packages
@gdamjan
gdamjan / README.md
Last active May 23, 2024 09:45
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@thomseddon
thomseddon / gist:4703968
Last active October 21, 2020 08:50
Auto Expanding/Grow textarea directive for AngularJS
/**
* The MIT License (MIT)
*
* Copyright (c) 2013 Thom Seddon
* Copyright (c) 2010 Google
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@sayedihashimi
sayedihashimi / msdeploy-setAcl-rootDir.xml
Created February 23, 2013 06:35
Shows how you can use the setAcl provider to set a permission on the root directory on publish.
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludeSetAclProviderOnDestination>false</IncludeSetAclProviderOnDestination>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
@alexcican
alexcican / Preferences.sublime-settings
Last active March 7, 2024 05:37
SublimeText User settings
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Color Scheme - Default/Tomorrow-Night-Eighties.tmTheme",
"file_exclude_patterns":
[
".DS_Store"
],
"folder_exclude_patterns":
[
"bin",
@willurd
willurd / web-servers.md
Last active May 25, 2024 13:16
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@otakusid
otakusid / MSDeploy_Create_Deploy_Package
Created June 30, 2013 17:30
How to create and deploy MSDeploy package using precompiled ASP.NET Web Application
rem Create package using manifest:
msdeploy -verb:sync -source:manifest="G:\CI_on_DVCS\PackageManifest.xml" -dest:package="g:\CI_on_DVCS\Package.zip"
rem Install package using manifest:
msdeploy -verb:sync -source:package="g:\CI_on_DVCS\Package.zip" -dest:manifest="G:\CI_on_DVCS\PackageInstallationManifest.xml",computerName=AMI,username="UserName",password="Password"
rem Create package using command line: