This file contains 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
Set-Variable -Name "username" -Value $env:UserName | |
Set-Variable -Name "destination" -Value "D:\Backup\20230103" | |
# D:\Dropbox\Configurazioni\ | |
$dirs = @{ | |
"C:\Users\$username\AppData\Roaming\Sublime Text 3\Local\" = "$destination\Sublime_Text\" | |
"C:\Users\$username\AppData\Local\Google\Chrome\User Data\" = "$destination\GoogleProfile\" | |
"C:\Users\$username\AppData\Roaming\AnyDesk\" = "$destination\AnyDesk\" |
This file contains 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
# Open powershell ad administrator: | |
# Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); Get-Boxstarter -Force | |
# install winget https://apps.microsoft.com/store/detail/programma-di-installazione-app/9NBLGGH4NNS1?hl=it-it&gl=it&rtc=1 | |
# Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/TheTrigger/aaf143b9e64b40d523ed9bdb47b1e53f/raw/boxstarter.ps1 -DisableReboots | |
# https://gist.github.com/TheTrigger/758c5fe82d73a8572eb3bc018961cd6f | |
Import-Module Boxstarter.Chocolatey |
This file contains 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
#!/bin/bash | |
# | |
# This script is for Ubuntu 18.04 Bionic Beaver to download and install XRDP+XORGXRDP via | |
# source. | |
# | |
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips. | |
# https://github.com/microsoft/linux-vm-tools/blob/master/ubuntu/18.04/install.sh | |
############################################################################### |
This file contains 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
name: NuGet Generation | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: windows-latest |
This file contains 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
using System.Text; | |
namespace CtrlCharReplace | |
{ | |
public static class Extensions | |
{ | |
public static string ReplaceCtrl(this string s) | |
{ | |
var sb = new StringBuilder(); | |
for (int i = 0; i < s.Length; i++) |
This file contains 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
Vue.directive("uppercase", { | |
twoWay: true, | |
// TODO: unbind | |
unbind: () => {}, | |
bind: function (el, binding, vnode) { | |
const findVModelName = vnode => { | |
try { | |
// https://forum.vuejs.org/t/solved-how-can-you-update-the-v-model-from-a-custom-directive-in-vue-2/2275 | |
return vnode.data.directives.find(o => { | |
return o.name === "model"; |
This file contains 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
<pre><?php | |
//Colori a disposizione | |
$COLORI = array("RED", "GREEN", "ORANGE", "BLUE", "YELLOW", "BLACK"); | |
//Creo la matrice in maniera randomica | |
for ($i = 0; $i < 5; $i++) { | |
for ($j = 0; $j < 5; $j++) { | |
$Matrix[$i][$j] = $COLORI[rand(0, count($COLORI) - 1)]; | |
} | |
} |