Skip to content

Instantly share code, notes, and snippets.

@ccaspers
ccaspers / 01-venv-tutorial.md
Last active April 27, 2024 04:04
Virtualenv Tutorial

Virtual Environments

A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable. - The Hitchhiker’s Guide to Python!

Virtual Environments werden also dazu genutzt um verschiedene Softwareprojekte und ihre Abhängigkeiten voneinander zu isolieren. Ein netter nebeneffekt ist, das Installation aus dem Python Package Index (pip) ohne Administratorrechte erfolgen können, weil die Pakete im Verzeichnis des Virtual Environments installiert werden.

Jedes Virtual Environment hat seine eigenen site-packages sowie pip- und python-Kommandos. Dabei wird der Interpreter nicht jedes neu installiert, sondern über Symlinks verknüpft.

Ein Virtual Environment erzeugen

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 04:04
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@paulmwatson
paulmwatson / cypress_test_404_spec.js
Created January 14, 2021 08:33
Testing a 404 page with Cypress
cy.visit('/404')
//=> Test fails
cy.visit('/404', {failOnStatusCode: false})
//=> Test passes but does not test the HTTP code was 404
cy.request({url: '/404', failOnStatusCode: false}).its('status').should('equal', 404)
cy.visit('/404', {failOnStatusCode: false})
//=> Test passes, tests that the HTTP code was 404, and tests page was visited
@igogrek
igogrek / How I started loving Vue.md
Last active April 27, 2024 03:59
How I started loving Vue

This article is the logical conclusion of my previous article - How I stopped loving Angular. Recommended to check before reading this one.

We have been using Vue instead of Angular for nearly a year now. In this article, I will highlight my impressions on Vue and differences compared to Angular.

Moreover, I will add some hands on experience notes from usage of Vue on real projects.

@igogrek
igogrek / Go code conventions.md
Last active April 27, 2024 03:59
Our team Go code custom conventions

General conventions

Effective go

Our main source of code conventions is the standard GO conventions from effective go - see https://golang.org/doc/effective_go.html

Please try to follow them as much as possible.

Context

All of our apps should have a context. This means one struct with references to the underlying dependencies. No global variables should exist. Context should be manually initialized at the start of the service with cascading initialization of all the underlying dependencies hierarchically. Constructors should be used to pass the dependencies.

This approach is used in absence of a nice dependency injection mechanism, but it has it's own benefits too.

@igogrek
igogrek / Cookbook.md
Last active April 27, 2024 03:58
Cookbook

This cookbook is similar to Vue cookbook but contains our custom recipes for some specific cases.

Form validation

For form validation we use Vuelidate

export default Vue.extend({
  ...
 validations: {
@baydam
baydam / build-pocketvj.md
Last active April 27, 2024 03:58
How to build PocketVJ on Raspberry Pi 3

Documentation for building PocketVJ on raspberry Pi 3

Install Raspbian Lite

Find the instruction in the link below https://www.raspberrypi.org/documentation/installation/installing-images/README.md

Install dependencies

$ sudo apt-get -y install lxde-core lxterminal lxappearance xinit lightdm ntfs-3g python-pexpect vim figlet git-core firmware-ralink hostapd isc-dhcp-server lighttpd samba samba-common-bin php5-common php5-cgi php5 php5-mysql screen fbi ttf-mscorefonts-installer mediainfo gparted php5-cli iptables xtightvncviewer imagemagick dosfstools exfat-utils exfat-fuse hfsplus hfsprogs hfsutils xdotool expect expect-dev avahi-daemon libavahi-compat-libdnssd-dev feh libjpeg8 libjpeg8-dev libao-dev avahi-utils libavahi-compat-libdnssd-dev libva-dev youtube-dl python-smbus mpg321 mpg123 libreoffice-impress rc-gui python-pip iceweasel python-dev python-dbus xpdf x11-xserver-utils libncurses5-dev shellinabox tk okular usbmount libgstreamer0.10-0 libgstreamer0.10-dev gstreamer0.10-tools gstr
@merikan
merikan / Jenkinsfile
Last active April 27, 2024 03:58
Some Jenkinsfile examples
Some Jenkinsfile examples
KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
T3ZWQ-P2738-3FJWS-YE7HT-6NA3K
KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
65Z2L-P36BY-YWJYC-TMJZL-YDZ2S
SFZHH-2Y246-Z483L-EU92B-LNYUA
GSZVS-5W4WA-T9F2E-L3XUX-68473
FTZ8A-R3CP8-AVHYW-KKRMQ-SYDLS
Q3ZWN-QWLZG-32G22-SCJXZ-9B5S4
DAZPH-G39D3-R4QY7-9PVAY-VQ6BU
KLZ5G-X37YY-65ZYN-EUSV7-WPPBS
@swiftui-lab
swiftui-lab / tree-layout-example.swift
Last active April 27, 2024 03:55
A Tree Layout Example (SwiftUI)
// Author: SwiftUI-Lab (swiftui-lab.com)
// Description: A Tree Layout example
// blog article: https://swiftui-lab.com/layout-protocol-part-2
import SwiftUI
struct TreeNode: Identifiable {
var parentId: UUID? = nil
let id: UUID = UUID()
let name: String