Skip to content

Instantly share code, notes, and snippets.

@martinandersen3d
martinandersen3d / print_installed_programs.sh
Created April 29, 2021 11:09
Linux / Ubuntu - List all installed programs and write to a text file
#!/bin/bash
sleep 1
LANG=en_US.UTF-8
outfile="~/installed_programs.txt"
# This Bash command will print all manually installed packages minus the ones that came from your Debian installation (in other words, the packages that you installed with apt install):
echo ' ' >> $outfile
echo 'COMMANDLINE UTILLITIES--------------------------------------------' > $outfile
apt-mark showmanual >> $outfile
@martinandersen3d
martinandersen3d / Javascript Typesafe Class.js
Created March 16, 2021 20:09
Javascript Typesafe Class
class Person {
constructor() {
this.data = {};
}
get first() {
return this.data.first || 'UNKNOWN';
};
set first(name) {
@martinandersen3d
martinandersen3d / CopyQ Export CLI commandline.ps1
Last active January 8, 2021 00:57
CopyQ Export CLI commandline - How to export all tabs to .txt files
# CopyQ - How to export ALL you tabs from copyq to text files!
# Use Powershell for the export
# CopyQ Help, with command: copyq help | Write-Output
# https://copyq.readthedocs.io/en/latest/command-line.html
# http://manpages.ubuntu.com/manpages/bionic/man1/copyq.1.html
# -------------------------------------------------------
# STEP 1. List the availible tabs with command:
copyq tab | Write-Output
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@martinandersen3d
martinandersen3d / launch.json
Created August 13, 2020 23:24
VsCode Python - automatically kill the task terminal after debugging
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
@martinandersen3d
martinandersen3d / list_all_icons.py
Created August 8, 2020 12:53
pyside qt 5 all icons
#!/usr/bin/python
# simple.py
from PySide2.QtWidgets import QApplication,QMainWindow, QAction, QStyle
import sys
from PySide2.QtGui import QIcon
class Window(QMainWindow):
@martinandersen3d
martinandersen3d / show files in a listbox from directory in a python tkinter listbox.py
Created July 12, 2020 18:29
show files in a listbox from directory in a python tkinter listbox
from tkinter import *
import tkinter.messagebox as box
window = Tk()
window.geometry("400x500")
window.title( 'Select File' )
frame = Frame( window )
# ---------------------------------

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.
@martinandersen3d
martinandersen3d / ApiRespond.php
Created March 21, 2020 13:28 — forked from dugajean/ApiRespond.php
Trait for easy creation of API responses
<?php
namespace App\Traits;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
trait ApiRespond
{
/**
@martinandersen3d
martinandersen3d / FullTextSearch.php
Created March 21, 2020 13:27 — forked from vijaybajrot/FullTextSearch.php
Full Text Search In Mysql and Laravel
<?php
namespace App\Traits;
trait FullTextSearch
{
/**
* Replaces spaces with full text search wildcards
*
* @param string $term