Skip to content

Instantly share code, notes, and snippets.

@alanivey
alanivey / php53-opcache.sh
Last active August 29, 2015 14:11
Install opcache for PHP 5.3 or 5.4 in OS X with Homebrew
brew install -v php53-opcache
sed -i '' "s|^\(opcache\.memory_consumption[[:space:]]*=[[:space:]]*\)[0-9]*|\1256|;" $(brew --prefix)/etc/php/5.3/conf.d/ext-opcache.ini
@KamilBalwierz
KamilBalwierz / admin.sql
Last active August 29, 2015 14:16
Create admin user Magento
LOCK TABLES `admin_role` WRITE , `admin_user` WRITE;
SET @PASSWORD = "password";
SET @FIRSTNAME = "Firstname";
SET @LASTNAME = "Lastname";
SET @USERNAME = "myuser";
SET @EMAIL = "email@example.com";
SET @SALT = "rp";
SET @PASS = CONCAT(MD5(CONCAT( @SALT , @PASSWORD) ), CONCAT(":", @SALT ));
@hans2103
hans2103 / robots.txt
Last active December 7, 2016 23:40
Magento robots.txt as published on our Byte blog Magento Robots.txt [http://www.byte.nl/blog/magento-robots-txt/]
# $Id: robots.txt,v magento-specific 2010/28/01 18:24:19 goba Exp $
# Edited: 2014/10/30 by Byte.nl
#
# robots.txt
#
# This file is to prevent the crawling and indexing of certain parts
# of your site by web crawlers and spiders run by sites like Yahoo!
# and Google. By telling these “robots” where not to go on your site,
# you save bandwidth and server resources.
#
@goivvy
goivvy / etc-nginx-sites-enabled-default
Last active March 1, 2017 08:17
Nginx for Magento 2.1.3
server {
listen 80 default_server;
listen [::]:80 default_server;
set $MAGE_ROOT /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
@jooyunghan
jooyunghan / Main.java
Created July 14, 2014 09:09
Retrofit + RxJava in Java
package com.company;
import retrofit.RestAdapter;
import retrofit.http.GET;
import retrofit.http.Path;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action1;
import rx.functions.Func1;
import rx.functions.Func2;
@eluleci
eluleci / RippleLinearLayout.java
Created September 25, 2014 16:15
Ease and ripple touch effects (Android L Like Touch Effects) on Android views
package com.cengalabs.flatui.sample;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
@hummer2k
hummer2k / magento2-varnish-4.0.vcl
Last active August 8, 2019 09:06
Magento 2 vcl for varnish 4
vcl 4.0;
import std;
# The minimal Varnish version is 4.0
backend default {
.host = "{{ host }}";
.port = "{{ port }}";
}
@colinmollenhour
colinmollenhour / Config.php
Last active April 22, 2020 09:45
Stampede-resistant Config Cache
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@markushi
markushi / MyActivity.java
Last active May 3, 2020 22:50
Reveal Color View Demo
package at.markushi.reveal;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.Point;
import android.os.Bundle;
import android.view.View;
import at.markushi.ui.RevealColorView;
@terlar
terlar / kubectl.fish
Last active January 31, 2021 04:11
Kubernetes fish completions
# kubernetes - is an open source system for managing containerized
# applications across multiple hosts, providing basic mechanisms for
# deployment, maintenance, and scaling of applications.
# See: https://kubernetes.io
function __kubectl_no_command
set -l cmd (commandline -poc)
if not set -q cmd[2]
return 0
end