Skip to content

Instantly share code, notes, and snippets.

View binarweb's full-sized avatar
🛌
Sleeping at the gym.

Binar Web binarweb

🛌
Sleeping at the gym.
View GitHub Profile
@claudia-romano
claudia-romano / codyframe-v2-php-config.js
Last active August 25, 2021 10:15
CodyFrame gulp config file for a PHP project
var gulp = require('gulp');
var sass = require('gulp-sass');
var sassGlob = require('gulp-sass-glob');
var browserSync = require('browser-sync');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
var cssvariables = require('postcss-css-variables');
var calc = require('postcss-calc');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@binarweb
binarweb / Github commands.md
Last active January 2, 2024 14:15
Github commands

This tutorial is about setting up a Github account to commit (via SSH) to an existing/new repository and common commands to handle that repository.

1. Setting up git

  • globally (recommended for one github account / OS user)

git config --global user.email "your_email@example.com"
git config --global user.name "Your Name"

  • locally (recommended for multiple github accounts / OS user)
@radiofrequency
radiofrequency / nginx_config_cloudfront_real_ips.js
Created February 5, 2018 07:39
list cloufront ip ranges for nginx real ip module
var request = require("request");
var fs = require("fs");
var output = "#cloudfront ip ranges\n";
request("https://ip-ranges.amazonaws.com/ip-ranges.json", function(err, res, body) {
if (err) {
console.error("error", err);
}
var j = JSON.parse(body);
j.prefixes.forEach(function(item) {
if (item.service ==='CLOUDFRONT') {
@joepie91
joepie91 / .service
Last active February 4, 2024 22:34
systemd service file example for Node.js
[Unit]
After=network.target
Description=Hello World App
[Service]
Environment="NODE_ENV=production"
ExecStart=/usr/bin/node /home/foo/test/index.js
Restart=on-failure
User=foo
@clemlatz
clemlatz / self-signed-ssl-certificate.md
Last active April 22, 2024 12:30
Setup a self-signed SSL certificate with Nginx (server and browser)

1. Configure server: Nginx

Create the certificate:

$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt

Create a strong Diffie-Hellman group:

$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
@ahsankhatri
ahsankhatri / README.md
Last active February 10, 2022 18:29
Database Driven Routes Laravel 5.2

Database Driven Routes Laravel 5.2

Table: url_alias

+----+-----------------+-------------------------------------------+-----------------+-----------+------------+
| id | slug            | map_to                                    | params          | http_verb | middleware |
+----+-----------------+-------------------------------------------+-----------------+-----------+------------+
| 1  | page/about-us   | Frontend\HomeController@showPage          | a:1:{i:0;i:4;}  | GET       | web        |
| 2  | page/contact-us | Backend\DashboardController@getContactUs  | a:1:{i:0;i:4;}  | GET       | web        |

| 3 | page/contact-us | Backend\DashboardController@postContactUs | | POST | web |

@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 2, 2024 01:27
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@davestevens
davestevens / LetsEncrypt.md
Last active March 28, 2024 10:35
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active March 30, 2024 04:14 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line