Skip to content

Instantly share code, notes, and snippets.

View killua99's full-sized avatar
🎯
Focusing

Luigi killua99

🎯
Focusing
View GitHub Profile
INFO global: Vagrant version: 1.8.4
INFO global: Ruby version: 2.2.3
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\gems\\vagrant-1.8.4\\bin\\vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_OLD_ENV_="F:=F:\\Projects\\DrupalContrib\\vm"
<?php
namespace Drupal\storleden_search\Plugin\rest\resource;
use Drupal\Core\Entity\EntityTypeManager;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\rest\Plugin\ResourceBase;
use Drupal\rest\ResourceResponse;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@killua99
killua99 / debug_log
Last active February 13, 2016 00:48
NFS hangs on booting using puphpet
INFO global: Vagrant version: 1.8.1
INFO global: Ruby version: 2.2.3
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_XDG_MENU_PREFIX="gnome-"
INFO global: VAGRANT_OLD_ENV_LC_NUMERIC="C"
INFO global: VAGRANT_OLD_ENV_LC_PAPER="C"
INFO global: VAGRANT_OLD_ENV_SHELL="/bin/bash"
INFO global: VAGRANT_OLD_ENV_SHLVL="2"
INFO global: VAGRANT_OLD_ENV_USERNAME="killua"
INFO global: VAGRANT_OLD_ENV_PAGER="less"
#!/bin/bash
DATE=`date +%Y%m%d%H%M`
DOCROOT='/mnt/xxxx/www/xxxxxx/docroot'
CURRENT_DIR=`pwd`
CURRENT_BUILD_DIR=$CURRENT_DIR/$DATE
cd $DOCROOT/web
# drupal ce
@killua99
killua99 / gist:d974cd5ee1440e7ea753
Created December 11, 2014 15:22
Instagram Preview on Tweetdeck Webapp
// ==UserScript==
// @name Show Instagram photos
// @namespace http://killua.me/
// @version 0.1
// @description This allows instagram pictures to be shown like normal
// @match http*.twitter.com/*
// @copyright 2014+, Luigi Guevara
// @require https://code.jquery.com/jquery-1.11.1.min.js
// @grant none
// ==/UserScript==
@killua99
killua99 / changelog.sh
Created May 7, 2014 21:14
bash script to generate changelog focused for Drupal modules
#!/bin/bash
# Author: Luigi Guevara <@killua99>
#
# Use
# For a Simple Tag changelog
# ./changelog > CHANGELOG.txt
#
# For a current dev branch with the old tag log
# ./changelog 7.x-2.x > CHANGELOG.txt
#!/bin/bash
# Check arguments and requirements.
if [ ${#@} -lt 1 ]; then
echo "This script expects one argument (site machine name)."
exit 1
fi
if [ -x ${HOME}/.my.cnf ]; then
echo "This script requires ${HOME}/.my.cnf."
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
# Second install an extra tools to download packages
sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get install apt-fast
@killua99
killua99 / template.php
Created July 17, 2013 15:10
add css and js in preprocess page
<?php
/**
* Preprocess page.
*/
function mytheme_preprocess_page(&$vars) {
drupal_add_css(path_to_theme() . '/css/foo.css', 'theme', 'all');
$vars['styles'] = drupal_get_css();
@killua99
killua99 / facebook_menu_fixer
Last active December 19, 2015 06:49
Facebook menu Fixer is a script that put an icon in the top bar to fix the sidebar menu when you're scrolling. Use this script with greasemonkey or tampermonkey.
// ==UserScript==
// @name facebook menu
// @namespace http://killua.me/
// @description Keep the menu aviable without scroll
// @include http*facebook.com/
// @include http*facebook.com/?sk=nf
// @include http*facebook.com/lists/*
// @include http*facebook.com/groups/*
// @version 1
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js