Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Luigi killua99

🎯
Focusing
View GitHub Profile
View vagrant hostmanager Windows 10
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"
View CalendarRestResource
<?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;
View perfectelementary.bash
#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 / debug_log
Last active Feb 13, 2016
NFS hangs on booting using puphpet
View debug_log
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"
View deploy.sh
#!/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 / template.php
Created Jul 17, 2013
add css and js in preprocess page
View template.php
<?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 Dec 19, 2015
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.
View facebook_menu_fixer
// ==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
@killua99
killua99 / custom_two_form.module
Last active Dec 19, 2015
two form in one page drupal
View custom_two_form.module
<?php
/**
* Implements hook_menu().
*/
function custom_two_form_menu() {
$items = array();
$items['custom'] = array(
'title' => 'Custom',
@killua99
killua99 / gist:d974cd5ee1440e7ea753
Created Dec 11, 2014
Instagram Preview on Tweetdeck Webapp
View gist:d974cd5ee1440e7ea753
// ==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
bash script to generate changelog focused for Drupal modules
View changelog.sh
#!/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
You can’t perform that action at this time.