Skip to content

Instantly share code, notes, and snippets.

🏖️

Ramon Lopez ecr007

🏖️
  • My Companyy
View GitHub Profile
@ecr007
ecr007 / PreferenceHelper.java
Created May 26, 2020 — forked from guptasanchit90/PreferenceHelper.java
A preference helper class for android.
View PreferenceHelper.java
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 / auto_git_file.md
Created Aug 19, 2019 — forked from darencard/auto_git_file.md
Automatic file git commit/push upon change
View auto_git_file.md

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 / WP-HTML-Compression
Created Jun 17, 2019 — forked from sethbergman/WP-HTML-Compression
Minify HTML for WordPress without a Plugin - Add to function.php
View WP-HTML-Compression
<?php
class WP_HTML_Compression
{
// Settings
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
// Variables
View Balsamiq mockups Serial
Organization name: leexij@gmail.com
Serial Key: eNrzzU/OLi0odswsqslJTa3IzHJIz03MzNFLzs+tMTQyNrcwsTQyAIEa5xpDAIFxDy8k
@ecr007
ecr007 / Install Composer using MAMP's PHP.md
Last active Mar 27, 2018 — 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
View Install Composer using MAMP's PHP.md

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
@ecr007
ecr007 / libgs_install.sh
Last active Jan 9, 2018 — forked from masbog/libgs_install.sh
Installing ghostscript 9 CentOS 6.5 with shared Library
View libgs_install.sh
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 / volley-POST-example.java
Created Dec 19, 2017 — forked from mombrea/volley-POST-example.java
Example of performing a POST request using Google Volley for Android
View volley-POST-example.java
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 / JOSNArraySwiftParsingiOS
Created Nov 17, 2017 — forked from ashishkakkad8/JOSNArraySwiftParsingiOS
JSON Array Parsing in Swift Langauage - Swift 3 – iOS 10 – Xcode 8 GM
View JOSNArraySwiftParsingiOS
//
// ViewController.swift
// SwiftJSONParsingDemo
//
// Created by Ashish Kakkad on 12/10/16.
// Copyright © 2016 Kode. All rights reserved.
//
import UIKit
You can’t perform that action at this time.