Skip to content

Instantly share code, notes, and snippets.

@ssheduardo
ssheduardo / Fetch sublime settings
Created April 5, 2012 11:51
Fetch sublime settings
{
"files":
{
"backbone": "http://documentcloud.github.com/backbone/backbone.js",
"backbone-min": "http://documentcloud.github.com/backbone/backbone-min.js",
"jquery": "http://code.jquery.com/jquery.min.js",
"json2": "https://github.com/douglascrockford/JSON-js/raw/master/json2.js",
"normalize": "https://raw.github.com/necolas/normalize.css/master/normalize.css",
"raphael": "http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js",
"reset": "http://meyerweb.com/eric/tools/css/reset/reset.css",
@ssheduardo
ssheduardo / .htaccess_codeigniter
Created April 5, 2012 16:10
htaccess codeigniter
RewriteEngine on
RewriteCond $1 !^(img|index.php|js|robots.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
@ssheduardo
ssheduardo / magento-code-snippets.md
Created February 11, 2016 12:17 — forked from arosenhagen/magento-code-snippets.md
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
<?php
namespace App\DataTables;
use App\User;
use Yajra\Datatables\Services\DataTable;
class UsersDataTable extends DataTable
{
/**
11,1 All
server {
listen 80;
listen 443 ssl http2;
server_name web.dev;
root "/home/vagrant/code/web.dev/public";
index index.html index.htm index.php;
charset utf-8;
server {
listen 80;
server_name proyecto.dev;
root /home/xxx/public_html/proyecto.dev/public;
index index.php index.html index.htm;
@ssheduardo
ssheduardo / config.yml
Created November 12, 2018 15:13
Circleci - laravel
version: 2 # use CircleCI 2.0
jobs:
build:
branches:
only:
- master
- develop
docker:
- image: circleci/php:7.1-node-browsers
docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
@ssheduardo
ssheduardo / .gitlab-ci.yml
Last active November 30, 2019 20:21
Deploy react to server with gitlab
build site:
image: node:12.13.0-slim
stage: build
before_script:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
- yarn install --pure-lockfile --cache-folder .yarn
cache:
paths:
- node_modules/
@ssheduardo
ssheduardo / openssl_encrypt_decrypt.php
Created November 26, 2019 12:55 — forked from joashp/openssl_encrypt_decrypt.php
Simple PHP encrypt and decrypt using OpenSSL
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/