Skip to content

Instantly share code, notes, and snippets.

View teocci's full-sized avatar
👨‍💻
Coding

Teocci teocci

👨‍💻
Coding
View GitHub Profile
@teocci
teocci / how-to-ssh-into-windows.md
Created October 13, 2022 08:07
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

@teocci
teocci / MultipleDevicesOverTCP.md
Last active May 6, 2024 09:13
How to connect multiple Android devices with ADB over TCP

#How to connect multiple Android devices with ADB over TCP

From your device, if it is rooted

According to a post on xda-developers, you can enable ADB over Wi-Fi from the device with the commands:

su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
@teocci
teocci / UsingOSQLCommandLineTool.md
Last active March 26, 2024 01:45
Using the OSQL Command Line Tool to Perform SQL Server Operations

Using the OSQL Command Line Tool to Perform SQL Server Operations

Applies To: Express Software Manager version 7.x and above

Summary

If you do not have a version of Microsoft SQL Server that includes an interactive management application such as SQL Enterprise Manager or SQL Studio, you can still perform maintenance tasks such as backup and restore, on your Express database using OSQL, the command line SQL tool. This technical note describes how to perform such tasks using OSQL.

Using OSQL with the Express Database

Awesome Go

Build Status Awesome A curated list of awesome Go frameworks, libraries and software. Inspired by awesome-python.

Contributing

Please take a quick gander at the contribution guidelines first. Thanks to all contributors; you rock!

If you see a package or project here that is no longer maintained or is not a good fit, please submit a pull request to improve this file. Thank you!

Contents

@teocci
teocci / install-nodejs-centos-7.md
Last active February 24, 2024 17:00
Installing Node.js in CentOS 7

Install NodeJS 16.17

sudo yum install -y gcc-c++ make curl
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -

sudo yum list available nodejs
sudo yum install -y nodejs
node -v
npm -v
@teocci
teocci / AwesomeCourses.md
Last active February 14, 2024 07:08
List of awesome university courses for learning Computer Science!

Awesome Courses Awesome

Introduction

There is a lot of hidden treasure lying within university pages scattered across the internet. This list is an attempt to bring to light those awesome courses which make their high-quality material i.e. assignments, lectures, notes, readings & examinations available online for free.

Table of Contents

@teocci
teocci / add-new-user.sh
Created November 25, 2021 10:04
A simple bash shell script to create a linux user and optionally make them a sudoer
#!/bin/bash
ROOT_UID=0 # Only users with $UID 0 have root privileges.
E_NOTROOT=87 # Non-root exit error.
# Run as root only (sudo counts)
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "You need root priveledges to run this script"
exit $E_NOTROOT
import java.util.ArrayList;
import java.util.List;
import java.util.stream.LongStream;
public class ObjectUpdateExample {
public static <T> void printArray(List<T> list) {
printArray(list.toArray());
}
@teocci
teocci / abstact.md
Last active October 19, 2023 06:24
Signal handling example for golang

Handling Unix Signals In Golang

Unix signals are software interrupts that are sent to a program to indicate that some important event has occurred. The events can vary from user requests to illegal memory access errors. Some signals, such as the interrupt signal, indicate that a user has asked the program to do something, not in the usual control flow.

Dealing with the operating system signals is important for various use cases in applications. For example, we might want a server to gracefully shut down when it receives a SIGTERM, or a command-line tool to stop processing input if it receives a SIGINT. Here’s how to handle signals in Go with channels.

os/signal package

Golang’s os/signal the package allows you to configure the behavior of your Golang program upon receiving certain types of UNIX signals. Most Linux/Unix-based programs will gladly die upon receiving a kill signal, but in case you want your program to intercept the signal first, perform some backup, flush data to disk, etc before dying,

@teocci
teocci / activateoffice2019.md
Created May 1, 2020 13:19 — forked from CHEF-KOCH/activateoffice2019.md
How to activate Office 2019
  • Download the Retail Office 2019 images (or standalone) (MS currently does not provide VL images for Windows [only MAcOS])
  • Go to https://github.com/abbodi1406/BatUtil/tree/master/OfficeC2R-R2V and download it
  • Install Office 2019 (Retail)
  • Use C2R-R2V (start the batch with admin rights)
  • Wait until all is finished
  • Activate Office with KMSAuto.Net, MSToolkit, batch scripts or manually like you would do with a normal KMS version