Skip to content

Instantly share code, notes, and snippets.

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@MrCoffey
MrCoffey / Preferences.sublime-settings
Created August 24, 2016 22:40
My personal sublime text configuration
{
"always_prompt_for_file_reload": false,
"always_show_minimap_viewport": true,
"animation_enabled": true,
"atomic_save": true,
"auto_close_tags": true,
"auto_complete": true,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin",
@MrCoffey
MrCoffey / webpack.config.js
Last active August 7, 2016 04:21
My base webpack configuration
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
var path = require('path');
module.exports = {
context: path.join(__dirname, "client"),
devtool: debug ? "inline-sourcemap" : null,
entry: [
"./js/app.js",
'webpack/hot/dev-server',
module Requests
module JsonHelpers
def json
JSON.parse(response.body)
end
end
end
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* STYLES GO HERE */
}
/* Smartphones (landscape) ----------- */
@media only screen
@MrCoffey
MrCoffey / refound.php
Created July 8, 2016 18:32
Ejemplo de como crear un reembolso con Tpaga
<?php
// Get cURL resource
$ch = curl_init();
// Set url
curl_setopt($ch, CURLOPT_URL, 'https://sandbox.tpaga.co/api/refund/credit_card');
// Set method
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
@MrCoffey
MrCoffey / css-media-queries-cheat-sheet.css
Created June 13, 2016 23:06 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@MrCoffey
MrCoffey / upgrate_button.html
Created May 31, 2016 16:07
Suscription 80000
<form method="post" action="https://webcheckout.tpaga.co/checkout" accept-charset="UTF-8">
<input type="image" value="Pagar" style="width:200px; border: 0 none; border-radius: 24px; padding: 12px 12px; margin: 9px; cursor: pointer; display: flex; justify-content: center; align-items: center; flex: 0 0 160px; text-align: center; line-height: 1.3; font-size: 1em; color: #fff; text-transform: none; font-weight: 500; background: #4E1971;" onclick="this.form.urlOrigen.value = window.location.href;">
<input name="purchase[merchant_token]" value="⁠⁠⁠ij7uea3mqv5klkkp1822ukbqicl8ter4" type="hidden">
<input name="purchase[purchase_description]" value="Upgrade Suscripción Mensual" type="hidden">
<input name="purchase[purchase_amount]" value="80000" type="hidden">
<input name="purchase[purchase_tax]" value="12800" type="hidden">
<input name="purchase[purchase_currency]" value="COP" type="hidden">
<input name="purchase[purchase_order_id]" value="UPGRD01" type="hidden">
<input name="purch
@MrCoffey
MrCoffey / ExampleTpagaCustomer.java
Created May 26, 2016 21:20
Tpaga Card Tokenize
import java.io.IOException;
import org.apache.http.client.fluent.*;
import org.apache.http.entity.ContentType;
public class SendRequest
{
public static void main(String[] args) {
sendRequest();
}
@MrCoffey
MrCoffey / create_tpaga_customer.php
Created May 25, 2016 19:55
Basic example of customer creation using PHP
<?php
// Get cURL resource
$ch = curl_init();
// Set url
curl_setopt($ch, CURLOPT_URL, 'https://sandbox.tpaga.co/api/customer');
// Set method
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');