Skip to content

Instantly share code, notes, and snippets.


Simone Busoli simoneb

  • NearForm
  • Italy
View GitHub Profile
simoneb /
Last active Aug 4, 2020 — forked from sandcastle/
Install TeamCity on Ubuntu with Nginx


Follow the steps below to install Team City on Ubuntu with Nginx as the proxy for port 80.

Install Team City:

# will install on port 8111
sudo wget -c -O /tmp/
simoneb / parser.cs
Last active Jan 7, 2020
Simple dynamic command line arguments parser
View parser.cs
class Options : DynamicObject
readonly IDictionary<string, object> inner = new ExpandoObject();
public override bool TryGetMember(GetMemberBinder binder, out object result)
if (!inner.TryGetValue(binder.Name, out result))
result = false;
result = result != null ? new OptionValue(result.ToString()) : (dynamic)true;
View knowledgebase.config.js
import myCustomTheme from '@my-custom-theme'
import { MyCustomFooter, MyCustomHomepage } from '@my-component-library'
export default {
// overriding theme
theme: myCustomTheme, // OR
theme: originalTheme => myCustomTheme,
// component presence
componentPresence: {
View useAxios.js
function useAxios(url) {
const [response, setResponse] = React.useState()
React.useEffect(() => {
.then(response => setResponse(response))
.catch(error => setResponse(error))
}, [url])
return response
View using.js
function App() {
const response = useAxios('{your http api}')
return (
simoneb / NAnt.exe.config
Created Oct 21, 2013
NAnt configuration file modified to support .NET 4.5
View NAnt.exe.config
<?xml version="1.0"?>
<!-- Leave this alone. Sets up configsectionhandler section -->
<section name="nant" type="NAnt.Core.ConfigurationSection, NAnt.Core" />
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
<!-- Used to indicate the location of the cache folder for shadow files -->
<add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" />
simoneb / rle.js
Created Sep 13, 2015
Javascript RLE
View rle.js
var str = 'AAABCCDEEE';
var expected = '3A1B2C1D3E';
var result = _.reduce(str+'\0',(a,c,i,s)=>{if(i&&s[i-1]!== c){a.r+=a.c+s[i-1];a.c=1;}else{a.c++;}return a;},{c:0,r:''}).r
result === expected;
simoneb / dabblet.css
Created Jan 14, 2017
The first commented line is your dabblet’s title
View dabblet.css
* The first commented line is your dabblet’s title
html {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
simoneb / linqpad-nunitlite.cs
Created Oct 29, 2012
NUnitLite in LINQPad
View linqpad-nunitlite.cs
void Main()
new NUnitLite.Runner.TextUI().Execute(new[]{"-noheader"});
// Define other methods and classes here
public void SomeTest()
View repro.js
let stream;
let events = ['message', 'tweet', 'delete', 'limit', 'scrub_geo', 'disconnect',
'connect', 'connected', 'reconnect', 'warning', 'status_withheld',
'user_withheld', 'friends', 'direct_message', 'user_event'];
function start(path, params) {
if (stream) stream.stop();
let T = new Twit({
You can’t perform that action at this time.