Skip to content

Instantly share code, notes, and snippets.

@janasco
janasco / AnyDesk-Reset.cmd
Created August 3, 2023 09:46
AnyDesk Reset
@echo off & setlocal enableextensions
title Reset AnyDesk
reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit)
chcp 437
call :stop_any
del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf"
del /f "%APPDATA%\AnyDesk\service.conf"
copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\"
rd /s /q "%temp%\thumbnails" 2>NUL
xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails"
@dungsaga
dungsaga / install_oracle_xe_18c_under_wsl2.md
Last active June 19, 2024 01:04
install Oracle XE 18x under WSL2

install Oracle XE 18x under WSL2

  • install package is RPM, it's easier to use CentOS 7 or 8 (from CentOS-WSL or wsldl)
  • if you want to use Debian/Ubuntu, you must convert RPM to DEB (but conversion with alien fails under Debian)
  • first, install oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
  • second, install oracle-database-xe-18c-1.0-1.x86_64.rpm
  • see https://mikesmithers.wordpress.com/2019/01/03/installing-and-configuring-oracle-18cxe-on-centos/
  • run as root: /etc/init.d/oracle-xe-18c configure
  • it would fail if host IP is auto-generated to be 127.0.1.1
  • you can update the IP in /etc /hosts and try it again
{
"files.autoSave": "onFocusChange",
"vim.easymotion": true,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.sneak": true,
"vim.easymotionMarkerooundColor": "#020202",
"vim.normalModeKeyBindings": [
@antfroger
antfroger / README.md
Last active May 13, 2024 15:30
Using xdebug with Windows 10, WSL2, Docker and VS Code

Configuring xdebug to work with Windows 10 (WSL2), Docker and VS Code

Configuring your dev environment to be able to use xdebug when you're working on Windows 10 (with WSL2) and Docker with VS Code can be (a bit) tricky.
This is a quick reminder of how I've done that.

Configuring the environment

  1. Install and configure xdebug in Docker

Install xdebug according to the Docker image you're using

@MayankFawkes
MayankFawkes / checkEmail.js
Last active November 19, 2022 08:38
Valid Email Checker JavaScript
const net = require('net')
const socket = net.createConnection(25, 'gmail-smtp-in.l.google.com', () => {
console.log('Connected!')
socket.write('HELO gmail\r\n')
socket.write('MAIL FROM: <noreply@mayank.org>\r\n')
socket.write('RCPT TO: <mkgupta74d@gmail.com>\r\n')
socket.write('QUIT\r\n')
})
socket.on('data', (buff) => console.log(buff.toString()))
@martinsam16
martinsam16 / docker-wsl2.md
Last active June 24, 2024 20:36
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu

@MayankFawkes
MayankFawkes / sources.list
Created August 6, 2020 03:13
Ubuntu 20.04 LTS (ARM64) (Focal Fossa) -- Full sources.list
deb http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse
@ppoffice
ppoffice / README.md
Last active June 20, 2024 00:51
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
#!/bin/bash
############################################################################
# This script simply formats a block device and mounts it to the data
# directory in a very safe manner by checking that the block device is
# completely empty
#
############################################################################
set -eu
if [ $# -ne 2 ]
@sdesalas
sdesalas / Async.gs
Last active May 9, 2024 07:02
Asynchronous execution for Google App Scripts (gas)
/*
* Async.gs
*
* Manages asyncronous execution via time-based triggers.
*
* Note that execution normally takes 30-60s due to scheduling of the trigger.
*
* @see https://developers.google.com/apps-script/reference/script/clock-trigger-builder.html
*/