Skip to content

Instantly share code, notes, and snippets.

View 7rin0's full-sized avatar

SEVERINO, Luis 7rin0

  • Lyon, France
View GitHub Profile
@7rin0
7rin0 / sync-vagrant-vbox.md
Last active April 25, 2016 19:56
Sometimes sync gets broken or even doesn't work. This script or procedural commands are intended to solve this issue

Its assumed that:

  • vagrant up is done
  • vagrant provision too
  • shared folders/sync still not work

First and foremost:

  • get your Virtualbox version: vboxmanage --version | cut -d 'r' -f1
  • keep the returned version and for this example lets say: VBOXVERSION = 4.3.36

Connect to your machine:

// Start application from japplascript.init()
var global_one,
global_two,
global_three,
japplascript = {
function_one: function () {
console.log('inside function one');
console.log(global_one);
@7rin0
7rin0 / install_ldap_server_centos_7.sh
Last active February 24, 2021 04:23
Install LDAP on Centos 7
#!/bin/bash
# Usage
# First create an encrypted password to be used as connection pass
# and pass as a parameter with the script. To create use: slappasswd
# Clean packages
sudo yum clean all
# Install openldap as service manager
sudo yum -y install openldap-servers openldap-clients
@7rin0
7rin0 / development.services.yml
Last active September 26, 2016 08:19
Drupal 8 - Dev environment
# Local development services.
# /drupal8/sites/development.services.yml
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
parameters:
twig.config:
debug: true
auto_reload: true
cache: false
@7rin0
7rin0 / chrome_php_logger.md
Last active October 16, 2016 13:31
Debug PHP using Chrome Console
@7rin0
7rin0 / repair_ubuntu_debian_grub.md
Last active October 16, 2016 13:51
Repair Debian Ubuntu Grub
@7rin0
7rin0 / nowakeup
Created November 3, 2016 03:40
ACPI - Wake up with Power button only (executed by root)
#!/bin/bash
echo 'UHC1' > /proc/acpi/wakeup
echo 'UHC2' > /proc/acpi/wakeup
echo 'UHC4' > /proc/acpi/wakeup
echo 'UHC6' > /proc/acpi/wakeup
echo 'USB5' > /proc/acpi/wakeup
echo 'USB3' > /proc/acpi/wakeup
echo 'USB5' > /proc/acpi/wakeup
@7rin0
7rin0 / Drupal8_Devel_VarDumper.md
Last active April 18, 2019 11:57
Debug Drupal 8 with VarDumper
@7rin0
7rin0 / fetch_each_origin.sh
Created February 20, 2017 21:40
Bypass some limitations on getting origin HEAD by parsing each branch individually.
#!/bin/bash
# Bypass some limitations on getting origin HEAD
# by parsing each branch individually.
# Get all origin branchs
ORIGINS=$(git ls-remote --heads origin | tr '\/' ' ' | tr -s ' ' | cut -d' ' -f3)
for branch in $ORIGINS
@7rin0
7rin0 / gist:ea890d2d4bf25a890b86aff01290e7d0
Created March 3, 2017 01:52
Docker exec root or default user
# Root.
$ docker exec -u 0 i -t {container_id/image_name} bash
or
# Default container's user.
$ docker exec i -t {container_id/image_name} bash