Skip to content

Instantly share code, notes, and snippets.

View MaxySpark's full-sized avatar
🐧
JS in Front JS in Back

BHARGAB MaxySpark

🐧
JS in Front JS in Back
View GitHub Profile
# HTTP — redirect all traffic to HTTPS
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
return 301 https://$host$request_uri;
}
# HTTPS — proxy all requests to the Node app
server {
# Enable HTTP/2
@MaxySpark
MaxySpark / gitlab-installer.sh
Created December 10, 2016 06:15
install gitlab in ubuntu 16.04 server
sudo apt-get install curl openssh-server ca-certificates postfix
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce
curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce-XXX.deb/download
dpkg -i gitlab-ce-XXX.deb
sudo gitlab-ctl reconfigure
cmake_minimum_required(VERSION 3.6)
set(PROJECT_NAME "OpenGL_01")
project(${PROJECT_NAME})
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES main.cpp)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
@MaxySpark
MaxySpark / slideoutmenu.css
Created January 20, 2017 16:16
Slideoutjs Shortcut
.slideout-menu {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
z-index: 0;
width: 256px;
/*overflow-y: scroll;*/
-webkit-overflow-scrolling: touch;
@MaxySpark
MaxySpark / .bashrc
Created April 18, 2017 20:36
dot files ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@MaxySpark
MaxySpark / client.c
Last active July 15, 2018 06:12
Socket Programming
/****************** SERVER CODE ****************/
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <arpa/inet.h>
int main(){
int welcomeSocket, newSocket;
@MaxySpark
MaxySpark / ubuntu-commands.md
Last active July 23, 2017 22:27
Command for ubuntu

Reconfigure Display Manager

sudo dpkg-reconfigure lightdm

Install KDE Plasma

sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install kubuntu-desktop
@MaxySpark
MaxySpark / xampp.desktop
Last active July 13, 2018 19:42
Xampp start ubuntu icon
[Desktop Entry]
Comment=Start and Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo /opt/lampp/manager-linux-x64.run
Icon=/usr/share/icons/Humanity/devices/24/network-wired.svg
Encoding=UTF-8
Terminal=false
Name=XAMPP Control Panel
Comment=Start and Stop XAMPP
Type=Application
@MaxySpark
MaxySpark / up.sh
Created June 3, 2017 18:02
My Bash Scripts
sudo apt-get update
sudo apt-get upgrade
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
Documentation=https://docs.mongodb.org/manual
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf