Skip to content

Instantly share code, notes, and snippets.

View sangimed's full-sized avatar

Mohamed I. sangimed

View GitHub Profile
@shirakaba
shirakaba / setup.md
Last active March 26, 2024 13:28
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

@7rin0
7rin0 / apache2_vhost_config_vuejs_dist
Created June 18, 2018 13:50
VueJS: Apache / Nginx vhost config examples
<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
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@etes
etes / pi_mount_usb.md
Last active March 14, 2024 17:31
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

@sallar
sallar / console-example.php
Created March 27, 2013 19:44
PHP Colored CLI Output Script.
<?php
// Output screenshot:
// http://cl.ly/NsqF
// -------------------------------------------------------
include_once 'console.php';
// ::log method usage
// -------------------------------------------------------
Console::log('Im Red!', 'red');
@stuart-warren
stuart-warren / CreateJob.sh
Last active March 8, 2024 16:20
Create a job in Jenkins (or folder) using the HTTP API
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder
@fuzunspm
fuzunspm / client-axios.js
Last active January 15, 2024 22:54
Nestjs File download
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) => {
@RulerOf
RulerOf / plex-streaming-quality-settings.md
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
@nickautomatic
nickautomatic / cmder.md
Last active September 20, 2023 13:59
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
@larsar
larsar / shared_folder_centos_virtualbox.txt
Created January 27, 2012 08:04
Mount shared folder on CentOS in VirtualBox
# 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
reboot