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 bash | |
| set -e | |
| cd ~ | |
| sudo -v | |
| # Make sure system is in a good, updated, clean, state. | |
| sudo apt-get -y update |
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
| #!/bin/bash | |
| # Install Latest XRDP with XORGXRDP and GFX/Glamor server-side acceleration | |
| # Tested on Ubuntu 22.04 LTS | |
| BUILD_DIR=/tmp/xrdpbuild | |
| echo "-> preparing $BUILD_DIR" | |
| rm -f -r $BUILD_DIR | |
| mkdir -p $BUILD_DIR | |
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
| cmake_minimum_required(VERSION 3.14) | |
| project("ROS2 Master") | |
| # usually I put this in a separate file include("/opt/ros/_common/Colcon.cmake") | |
| function(colcon_add_subdirectories) | |
| cmake_parse_arguments(PARSE_ARGV 0 "ARG" "" "BUILD_BASE;BASE_PATHS" "") | |
| message("search criteria: ${ARGV}") | |
| execute_process(COMMAND colcon list |
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
| @' | |
| $NetSettingsPath = 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings' | |
| $Enable = (Get-ItemProperty -Path "$NetSettingsPath" -Name 'ProxyEnable').ProxyEnable | |
| If ("$Enable" -eq '1') { | |
| $ProxyServerSetting = (Get-ItemProperty -Path "$NetSettingsPath" -Name 'ProxyServer').ProxyServer | |
| If ($ProxyServerSetting.Contains('=')) { | |
| $ProxyServerSetting -split ';' | | |
| Foreach-object { | |
| $Parts = $($_ -split '=') | |
| $Protocol = $Parts[0] |
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
| function RobostCopy { | |
| param ( | |
| [Parameter(Position = 0)] | |
| [string] $SourcePath, | |
| [Parameter(Position = 1)] | |
| [string] $TargetPath | |
| ) | |
| # https://stackoverflow.com/a/7487697/13910382 |
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
| [CmdletBinding()] | |
| param ( | |
| [switch] $Show, | |
| [switch] $Reveal, | |
| [switch] $Grant, | |
| [switch] $Revoke, | |
| [switch] $Elevated | |
| ) | |
| if (-NOT $Args.Count) { |
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
| param ( | |
| [Parameter()] [switch]$Update | |
| ) | |
| # Install New apps | |
| function RefreshEnv { | |
| $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") | |
| } |
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
| [{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375"," |
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 node-esm.sh | |
| import { promises, constants, existsSync, createReadStream, createWriteStream } from "fs"; | |
| import { join } from "path"; | |
| import { pipeline } from "stream/promises"; | |
| import { createRequire } from "module"; | |
| import { Transform } from "stream"; | |
| const __dirname = process.env.__dirname; |
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
| #!/bin/sh | |
| readonly vscode_server_path=${HOME}/.vscode-server/bin | |
| node_activated=0 | |
| if [ -d "${vscode_server_path}" ]; then | |
| for commit_hash_folder in $(ls "$vscode_server_path"); do | |
| if [ -d "${vscode_server_path}/$commit_hash_folder" ]; then | |
| if [ -x "${vscode_server_path}/$commit_hash_folder/node" ]; then | |
| "${vscode_server_path}/$commit_hash_folder/node" $@ |
NewerOlder