These set of scripts are for Magento 1. For Magento 2, see this Gist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Admin/Admin.php | |
/** | |
* @return | |
*/ | |
public function getDataSourceIterator() | |
{ | |
$datagrid = $this->getDatagrid(); | |
$datagrid->buildPager(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'time' | |
module Pomodoro | |
INTERVAL = 25 # minutes | |
TOTAL_INTERVALS = 4 | |
BREAK_TIME = 5 # minutes | |
def self.notify(title, body) | |
system("notify-send -a pomodoro -t 5000 -u critical -i appointment '#{title}' '#{body}'") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://papertrailapp.com/systems/setup | |
# sudo sh | |
# cd /etc | |
# wget https://papertrailapp.com/tools/syslog.papertrail.crt | |
# yum install rsyslog-gnutls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
### | |
# | |
# install_mysql.sh | |
# | |
# This script assumes your Vagrantfile has been configured to map the root of | |
# your application to /vagrant and that your web root is the "public" folder | |
# (Laravel standard). Standard and error output is sent to | |
# /vagrant/vm_build.log during provisioning. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $DRONE_BRANCH ]; then | |
git fetch --unshallow | |
git remote remove dokku | |
git remote add dokku dokku@foo.dokkuhost.com:project-bar-$DRONE_BRANCH | |
git push dokku $DRONE_BRANCH:master | |
fi |
Sometimes you may have a run away reindex process that aborted due to a MySQL connection error of some sorts. It may be useful to use the following MySQL commands to aid in debugging.
Magento Enterprise labels the reindex lock via the constant REINDEX_FULL_LOCK in app/code/core/Enterprise/Index/Model/Observer.php
SELECT IS_FREE_LOCK('mydatabase_name.reindex_full')
Returns 1 is specified lock is free and can be acquired, 0 if it’s in use, NULL if an error occurs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8.4) | |
project(clue) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/") | |
include("lua.cmake") | |
set(SOURCE_FILES main.cpp) | |
add_executable(clue ${SOURCE_FILES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2004-2015 ZNC, see the NOTICE file for details. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Taken from https://gist.github.com/mmichelli/1062600 | |
;; replace html-mode with web-mode in line 4 to get more web-mode like behaviour | |
(define-derived-mode silverstripe-mode html-mode "Silverstripe" | |
(font-lock-add-keywords | |
nil | |
'( | |
("\\(<% \\| %>\\)" 1 font-lock-keyword-face) | |
("\\(\\(if\\|else\\|control\\|cacheblock\\|Level\\|end_[a-zA-Z1-9_\.]*\\|include\\)+\\)\\>" 1 font-lock-function-name-face) |
OlderNewer