Skip to content

Instantly share code, notes, and snippets.

View ecr007's full-sized avatar
Github Refactoring ... 10%

ECR007 ecr007

Github Refactoring ... 10%
  • ...
  • In The World
View GitHub Profile
@ecr007
ecr007 / JOSNArraySwiftParsingiOS
Created November 17, 2017 19:04 — forked from ashishkakkad8/JOSNArraySwiftParsingiOS
JSON Array Parsing in Swift Langauage - Swift 3 – iOS 10 – Xcode 8 GM
//
// ViewController.swift
// SwiftJSONParsingDemo
//
// Created by Ashish Kakkad on 12/10/16.
// Copyright © 2016 Kode. All rights reserved.
//
import UIKit
@ecr007
ecr007 / volley-POST-example.java
Created December 19, 2017 01:21 — forked from mombrea/volley-POST-example.java
Example of performing a POST request using Google Volley for Android
public static void postNewComment(Context context,final UserAccount userAccount,final String comment,final int blogId,final int postId){
mPostCommentResponse.requestStarted();
RequestQueue queue = Volley.newRequestQueue(context);
StringRequest sr = new StringRequest(Request.Method.POST,"http://api.someservice.com/post/comment", new Response.Listener<String>() {
@Override
public void onResponse(String response) {
mPostCommentResponse.requestCompleted();
}
}, new Response.ErrorListener() {
@Override
@ecr007
ecr007 / libgs_install.sh
Last active January 9, 2018 16:20 — forked from masbog/libgs_install.sh
Installing ghostscript 9 CentOS 6.5 with shared Library
curl -O http://downloads.ghostscript.com/public/ghostscript-9.22.tar.gz &&
tar -xzf ghostscript-9.22.tar.gz &&
cd ghostscript-9.22 &&
./configure &&
make install &&
make so &&
cp ghostscript-9.22/sobin/libgs.so.9.22 /usr/lib &&
ln -s /usr/lib/libgs.so.9.22 /usr/lib/libgs.so &&
mkdir -p /etc/ld.so.conf.d/ &&
echo "/usr/lib/libgs.so" > /etc/ld.so.conf.d/libgs.conf &&
@ecr007
ecr007 / Ver ruta de un programa en linux
Created January 10, 2018 18:26
Ver ruta de un programa en linux ECR
which pdftk
@ecr007
ecr007 / Install Composer using MAMP's PHP.md
Last active March 27, 2018 18:31 — forked from irazasyed/Install Composer using MAMP's PHP.md
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

Organization name: leexij@gmail.com
Serial Key: eNrzzU/OLi0odswsqslJTa3IzHJIz03MzNFLzs+tMTQyNrcwsTQyAIEa5xpDAIFxDy8k
@ecr007
ecr007 / WP-HTML-Compression
Created June 17, 2019 23:10 — forked from sethbergman/WP-HTML-Compression
Minify HTML for WordPress without a Plugin - Add to function.php
<?php
class WP_HTML_Compression
{
// Settings
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
// Variables
@ecr007
ecr007 / auto_git_file.md
Created August 19, 2019 18:18 — forked from darencard/auto_git_file.md
Automatic file git commit/push upon change

Automatically push an updated file whenever it is changed

Linux

  1. Make sure inotify-tools is installed (https://github.com/rvoicilas/inotify-tools)
  2. Configure git as usual
  3. Clone the git repository of interest from github and, if necessary, add file you want to monitor
  4. Allow username/password to be cached so you aren't asked everytime
git config credential.helper store
@ecr007
ecr007 / PreferenceHelper.java
Created May 26, 2020 16:08 — forked from guptasanchit90/PreferenceHelper.java
A preference helper class for android.
package <Package Name>;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import java.util.Map;
import java.util.Set;
public class PreferenceHelper {
@ecr007
ecr007 / my.cnf
Created May 26, 2021 19:01 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on cPanel/WHM servers)
# === Optimized my.cnf configuration for MySQL/MariaSQL (on cPanel/WHM servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated February 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#