Skip to content

Instantly share code, notes, and snippets.

# Colorful Bash Prompt, inspired by "Extravagant Zsh Prompt"
# Screenshot: http://img.gf3.ca/d54942f474256ec26a49893681c49b5a.png
# A big thanks to \amethyst on Freenode
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
tput sgr0
@jalvarado91
jalvarado91 / GoogleMapClean
Created January 9, 2014 22:53
JSON to style a google map(API v3) to a clean look without all the clutter a usual map has. (Looks better near a water mass)
[
{
"featureType": "administrative.neighborhood",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "road.local",
"stylers": [
{ "visibility": "off" }
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "master"
# Server Configuration
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "master"
# Server Configuration
API METHOD
osascript -e 'tell application "Spotify" to id of current track' | sed -e 's/.*track://' | xargs -I {} curl -X GET "https://api.spotify.com/v1/tracks/{}"
LOCAL METHOD
osascript -e 'tell application "Spotify" to name of current track';osascript -e 'tell application "Spotify" to artist of current track';osascript -e 'tell application "Spotify" to album of current track';
@jalvarado91
jalvarado91 / gist:8d9b4dcf4878d01bb4bb
Created November 12, 2014 18:30
Php fpm on apache.
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/vagrant/hyperboot/public/
ProxyPassMatch ^/(.*\.htm(/.*)?)$ fcgi://127.0.0.1:9000/vagrant/hyperboot/public/
...imports...
public class ResultsActivity extends AppCompatActivity implements
ResultListFragment.OnListFragmentInteractionListener,
ResultsMapFragment.OnResultsMapFragmentInteractionListener{
public static final String TAG = ResultsActivity.class.getSimpleName();
public static final int LIST_FRAGMENT = 1;
@jalvarado91
jalvarado91 / LIFE.js
Created January 24, 2016 09:16
LIFE
$.ajax({
url: 'http://162.243.13.61:5000/image',
method: 'POST',
data: {
imgurl: 'http://i.imgur.com/VYRufof.jpg'
}
}).done(function(data){
console.log(data);
});
<?php
include_once("../config.php");
include_once("resizeimage.php");
error_reporting(E_ALL);
$user_id = $_SESSION['account'][0]->id;
$id = intval($_POST['id']);
$type = $_POST['type']; //listing //condo //community //timeline
$standard_width = 1280;
$ratio = .70;
@jalvarado91
jalvarado91 / HttpUtil.java
Last active September 15, 2017 13:46
Ok Http Callback Wrap
package com.example.jalvarado.mlsview.utils;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.Response;
import java.io.IOException;