Skip to content

Instantly share code, notes, and snippets.

Avatar

martinandersen3d

View GitHub Profile
@martinandersen3d
martinandersen3d / CopyQ Export CLI commandline.ps1
Last active Jan 8, 2021
CopyQ Export CLI commandline - How to export all tabs to .txt files
View CopyQ Export CLI commandline.ps1
# 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
View The Ultimate Bad Ass .bashrc File
#!/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 Aug 13, 2020
VsCode Python - automatically kill the task terminal after debugging
View launch.json
{
// 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",
View list_all_icons.py
#!/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 Jul 12, 2020
show files in a listbox from directory in a python tkinter listbox
View show files in a listbox from directory in a python tkinter listbox.py
from tkinter import *
import tkinter.messagebox as box
window = Tk()
window.geometry("400x500")
window.title( 'Select File' )
frame = Frame( window )
# ---------------------------------
View report-asp.net-vs-node.js-for-backend-comparison.md

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 Mar 21, 2020 — forked from dugajean/ApiRespond.php
Trait for easy creation of API responses
View ApiRespond.php
<?php
namespace App\Traits;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
trait ApiRespond
{
/**
@martinandersen3d
martinandersen3d / FullTextSearch.php
Created Mar 21, 2020 — forked from vijaybajrot/FullTextSearch.php
Full Text Search In Mysql and Laravel
View FullTextSearch.php
<?php
namespace App\Traits;
trait FullTextSearch
{
/**
* Replaces spaces with full text search wildcards
*
* @param string $term
@martinandersen3d
martinandersen3d / FileTrait.php
Created Mar 21, 2020 — forked from AleksandrKirshin/FileTrait.php
Download File and get FileName methods Laravel Framework
View FileTrait.php
<?php
namespace App\Traits;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
trait FileTrait
{
@martinandersen3d
martinandersen3d / ConvertsNumbers.php
Created Mar 21, 2020 — forked from andyunleashed/ConvertsNumbers.php
A trait for converting numbers to and from integers/floats for display and storage.
View ConvertsNumbers.php
<?php
namespace App\Traits;
trait ConvertsNumbers {
public function isConvertable($key)
{
if(!isset($this->convertable)) {
return false;