Skip to content

Instantly share code, notes, and snippets.

View sangimed's full-sized avatar

Mohamed I. sangimed

View GitHub Profile
taskylizard /
Last active March 2, 2024 06:13
/r/freemediaheckyeah, in one single file (view raw)
mjclemente / app.e2e-spec.ts
Created August 4, 2020 21:30 — forked from firxworx/app.e2e-spec.ts
NestJS Integration/E2E Testing Example with TypeORM, Postgres, JWT
View app.e2e-spec.ts
import { Test, TestingModule } from '@nestjs/testing'
import { INestApplication, LoggerService } from '@nestjs/common'
import * as request from 'supertest'
import { AppModule } from './../src/app.module'
class TestLogger implements LoggerService {
log(message: string) {}
error(message: string, trace: string) {}
warn(message: string) {}
debug(message: string) {}
zarv1k / abstract-unique-validator.ts
Last active January 18, 2024 16:01
Unique Validator Example for NestJS
View abstract-unique-validator.ts
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm';
interface UniqueValidationArguments<E> extends ValidationArguments {
constraints: [
ObjectType<E> | EntitySchema<E> | string,
((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E,
Nairit11 / Docker Cheat
Last active August 15, 2023 04:56
Cheat Sheet for Docker
View Docker Cheat


Run an Image

docker run image_name

To run a specific version use a tag. By default tag is 'latest'

docker run image_name:version

fuzunspm / client-axios.js
Last active January 15, 2024 22:54
Nestjs File download
View client-axios.js
export default class http {
async download(endpoint) {
const token = this.loadToken();
const invoice = await axios({
url: `${this.NEST_APP_IP}/${endpoint}`,
method: 'GET',
responseType: 'blob',
headers: {
Authorization: `Bearer ${token}`
}}).then((response) => {
Prezens / gist:f99fd28124b5557eb16816229391afee
Created April 2, 2019 07:40
Apache .htaccess settings for Vue, vue-router
View gist:f99fd28124b5557eb16816229391afee
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
RulerOf /
Last active October 16, 2023 03:53
Adjusting Plex Media Player streaming quality defaults and per-stream

Setting a default quality in Plex Media Player desktop

The Plex Media Player desktop application's default quality setting is in different places depending on the interface you're using. The Plex Web UI is used as a point-and-click interface, whereas the Plex Media Player TV UI is used as a remote-friendly interface.

Plex Web UI Plex Media Player TV UI
7rin0 / apache2_vhost_config_vuejs_dist
Created June 18, 2018 13:50
VueJS: Apache / Nginx vhost config examples
View apache2_vhost_config_vuejs_dist
<VirtualHost *:80>
DocumentRoot "/home/dev/server/project/dist/"
ServerName vuejs.project.local
<Directory /home/dev/server/project/dist/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
Order allow,deny
allow from all
shirakaba /
Last active January 30, 2024 10:37
Configuring Nexus as a private registry for npm packages

Get the details to connect to your Nexus-managed npm repository

Note: Nexus group repositories (good example in this StackOverflow question) are out of this tutorial's scope. In any case, deployment to group repositories is currently still an open issue for Nexus 3 (and not intended ever to be implemented in Nexus 2). Thus, it is assumed that we'll push & pull to/from the same repository, and ignore the idea of groups hereon in.

  1. Ask your sysadmin for a username & password allowing you to log into your organistation's Nexus Repository Manager.

  2. Test the login credentials on the Nexus Repository manager at: http://localhost:8081/nexus/#view-repositories (localhost in our case is replaced by a static IP, and can only be connected to over VPN). If your organisation requires a VPN to connect to it, connect to that VPN before proceeding with this tutori

roxma / shared_folder_centos_virtualbox.txt
Created October 25, 2016 07:42 — forked from larsar/shared_folder_centos_virtualbox.txt
Mount shared folder on CentOS in VirtualBox
View shared_folder_centos_virtualbox.txt
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make