Skip to content

Instantly share code, notes, and snippets.

// import { Angular2FontawesomeModule } from 'angular2-fontawesome/angular2-fontawesome';
// import { HttpClientModule} from '@angular/common/http';
// import { Pipe, PipeTransform } from '@angular/core';
// import { BrowserModule } from '@angular/platform-browser';
// import {FormsModule} from '@angular/forms';
// import { RouterModule } from '@angular/router';
// import {HttpModule} from '@angular/http';
// import {NgxPaginationModule} from 'ngx-pagination';
// import { AppComponent } from './app.component';
// import { AboutComponent } from './components/about.component';
@echo off
SET tool=%~1
SET url=%~2
set extension=%~3
SET version=%~4
SET relativePath=%~5
if "%extension%"=="" (
SET extension=exe
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ReflectionExpressions
{
@sdluxeon
sdluxeon / background.vbs
Created September 13, 2016 21:24
consul-config
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & WScript.Arguments(0) & Chr(34), 0
Set WshShell = Nothing
{
"id": 19586252,
"name": "KETO-KREME - Coffee Shop",
"type": "Video",
"created": "2016-04-12T18:12:06+00:00",
"updated": "2016-05-15T09:44:28+00:00",
"duration": 170.239,
"hashed_id": "12j36v4bhq",
"description": "",
"progress": 1.0,
@sdluxeon
sdluxeon / use-tool
Created March 12, 2016 09:03
use tool
@echo off
SETLOCAL
SET npm=%LocalAppData%\npm\npm.exe
CALL :use-tool node https://nodejs.org/dist/v4.4.0/win-x64/node.exe
%node%
EXIT /B 0
@sdluxeon
sdluxeon / Cassandra backup & restore
Last active June 15, 2022 04:33
CASSANDRA SNAPSHOTING
//READ nodetool snapshot documentation in cassandra
//READ stack-overflow-topic gist or directly in stackoverflow -> http://stackoverflow.com/questions/25465904/how-can-i-restore-cassandra-snapshots
//EXPORT the databases schemas
cqlsh -e "DESCRIBE SCHEMA" > my_backup_name.schema
//Create snapshot of the whole server
nodetool snapshot my_backup_name
//Compress the backups
<Activity mc:Ignorable="sads sap sap2010" x:Class="TfsBuild.Process" this:Process.BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" this:Process.CleanRepository="[True]" this:Process.AgentSettings="[New Microsoft.TeamFoundation.Build.Common.BuildParameter(&quot; { &quot;&quot;MaxExecutionTime&quot;&quot;: &quot;&quot;00:00:00&quot;&quot;, &quot;&quot;MaxWaitTime&quot;&quot;: &quot;&quot;04:00:00&quot;&quot;, &quot;&quot;Name&quot;&quot;: &quot;&quot;*&quot;&quot;, &quot;&quot;Tags&quot;&quot;: [], &quot;&quot;TagComparison&quot;&quot;: &quot;&quot;MatchExactly&quot;&quot; } &quot;)]" this:Process.CleanBuild="[True]" this:Process.OutputLocation="[&quot;SingleFolder&quot;]" this:Process.CreateWorkItem="[True]" this:Process.UpdateAssociatedWorkItems="[True]" this:Process.SupportedReasons="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated" this:Process.BuildProcessVersion="12.0"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activiti
@sdluxeon
sdluxeon / Docker MS Windows
Last active February 23, 2017 21:23
Docker MS Windows
Turn off firewall on guest machine.
To Turn Off:
NetSh Advfirewall set allprofiles state off
To Turn On:
NetSh Advfirewall set allrprofiles state on
To check the status of Windows Firewall:
Netsh Advfirewall show allprofiles
docker run --restart=always -d --name docker-cass -p 9042:9042 -p 9160:9160 -p 7199:7199 -p 7001:7001 -p 7000:7000 cassandra
docker run --restart=always -d -e RABBITMQ_NODENAME=docker-rabbitmq --name docker-rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:3.5.2-management
docker run --restart=always -d --name docker-elastic -p 9200:9200 -p 9300:9300 elasticsearch
docker run --restart=always --name docker-go-server -i -t -p 8153:8153 -p 8154:8154 gocd/gocd-server