sudo -s
cat /proc/sys/fs/inotify/max_user_watches
8192
echo 524288 > /proc/sys/fs/inotify/max_user_watches
This file contains hidden or 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
// This exemple shows : | |
// * how to start an app with a free local port | |
// * how to find urls used and open a brower | |
// * how to stop the server | |
// | |
// Of course it's not production ready, it's a simple howto/reminder. | |
// | |
// Some part are come from : | |
// https://andrewlock.net/how-to-automatically-choose-a-free-port-in-asp-net-core/ |
This file contains hidden or 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
#! /usr/bin/env ruby | |
# Parse all NuGet packages under the package directory and print | |
# all packages names followeb by its dependencies. The format | |
# is not pretty, but useful combined with 'grep'. | |
require 'zip' # rubyzip | |
require 'rexml/document' | |
Dir.glob("packages/**/*.nupkg").each do |nupkg| |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"github.com/samonzeweb/godb" | |
"github.com/samonzeweb/godb/adapters/mssql" | |
"github.com/samonzeweb/godb/dbreflect" | |
"github.com/shopspring/decimal" | |
) |
This file contains hidden or 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
{ | |
"ASP.NET Core MVC Controller": { | |
"prefix": "controller", | |
"description": "A minimal ASP.NET Core MVC controller.", | |
"body": [ | |
"using System;", | |
"using System.Collections.Generic;", | |
"using System.Linq;", | |
"using System.Threading.Tasks;", | |
"using Microsoft.AspNetCore.Mvc;", |
This file contains hidden or 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
# SQL Server parameters | |
$serverInstance = 'localhost' | |
# Backup parameters | |
$backupDirectory = 'C:\path\to\backup\dir' | |
$retentionDays = 10 | |
# Mail parameters | |
$mailFrom = '[email protected]' | |
$mailTo = '[email protected]' |
This file contains hidden or 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
# Script parameters | |
$pathToClean = 'C:\paht\to\somewhere' | |
$maxDays = 5 | |
# Computed values, don't touch below | |
$dateLimit = (Get-Date).AddDays(-1 * $maxDays) | |
Get-ChildItem $pathToClean | | |
Where { $_.CreationTime -lt $dateLimit } | | |
Remove-Item -Recurse #-WhatIf |
This file contains hidden or 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
# SQL Sever & firewall : https://docs.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access | |
# New-NetFirewallRule : https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=win10-ps | |
New-NetFirewallRule -DisplayName "SQLServer default instance" -Direction Inbound -LocalPort 1433 -Protocol TCP -Action Allow | |
New-NetFirewallRule -DisplayName "SQLServer Browser service" -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow |
This file contains hidden or 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
package main | |
// ---------- | |
// How to developp with Vue.js and golang (or other JS framework) | |
// (awful almost raw notes) | |
// | |
// ---------- | |
// Create a projet ClientVue with vue-cli | |
// | |
// For developpment with webpack add a proxy to |
This file contains hidden or 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
# Proxy API to avoid CORS problems during development : | |
# - Get Caddy from https://caddyserver.com/ | |
# - Put the Caddyfile somewhere with the Caddy executable | |
# - Change posts, paths, ... as needed | |
# - Start the Caddy process (without args) | |
# - Lauch the SPA using the URL http://localhost:8081 | |
localhost:8081 | |
log stderr |
NewerOlder