Skip to content

Instantly share code, notes, and snippets.

View i-oliva's full-sized avatar
:shipit:

Ismael Oliva i-oliva

:shipit:
  • 16:06 (UTC -12:00)
View GitHub Profile
erver Protocol packages File for Spacemacs
;;
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
;;
;; Author: Fangrui Song <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun dotspacemacs/user-config ()
"Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
(add-to-list 'load-path "~/.emacs.d/private/snippets/es6-snippets")
(require 'es6-snippets)
)
@i-oliva
i-oliva / txt
Created August 2, 2018 00:33
This
position: 693 of 1560 (44%), column: 29
character: 0 (displayed as 0) (codepoint 48, #o60, #x30)
preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x30
script: latin
syntax: w which means: word
category: .:Base, a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET 30" or "C-x 8 RET DIGIT ZERO"
buffer code: #x30
file code: #x30 (encoded by coding system undecided-dos)
@i-oliva
i-oliva / highlight-numbers.el
Created August 2, 2018 00:34
numbers face file
;;; highlight-numbers.el --- Highlight numbers in source code -*- lexical-binding: t -*-
;; Author: Fanael Linithien <[email protected]>
;; URL: https://github.com/Fanael/highlight-numbers
;; Package-Version: 20170905.342
;; Version: 0.2.3
;; Package-Requires: ((emacs "24") (parent-mode "2.0"))
;; This file is NOT part of GNU Emacs.
# #---Basic Definitions---# #
# Needed for i3-gaps
for_window [class="^.*"] border pixel 2
gaps inner 0
gaps outer 0
set $term --no-startup-id $TERMINAL
set $mod Mod4
set $stoprec --no-startup-id killrecording
set $shutdown sudo shutdown -h now
@i-oliva
i-oliva / js
Created August 16, 2018 19:26
rot13
function rot13(str) {
const arr = str.split('');
const newArray = [];
const first = {
'A' : 'N',
'B' : 'O',
'C' : 'P',
'D' : 'Q',
'E' : 'R',
//this is where all the reducers are going to be combined
import { combineReducers } from "redux";
import bookReducer from "../reducers/reducer_bookList";
const rootReducer = combineReducers({
book: bookReducer
});
export default rootReducer;
@i-oliva
i-oliva / ejemplo.js
Created September 17, 2018 14:17
mas declarativo
const validateCES = req => {
const endPointReq = req.url;
const ivuser = "A700033";
const endPoints2Users = {
"/deployment/14/revision/save": ["A700048"],
"/v2/ticker/": ["A700033", "A700048"],
"/product/14/deployment/16/revision/getAll": ["A700052"],
"/deployment/15/revision/delete": ["A700541"]
};
const access = [];
@i-oliva
i-oliva / .js
Created September 20, 2018 20:25
Anagram
function checkAnagram(str1, str2) {
return (
Object.keys(createObjOfOcurrences(str1)).sort() ===
Object.keys(createObjOfOcurrences(str2)).sort() &&
Object.values(createObjOfOcurrences(str1)).sort() ===
Object.values(createObjOfOcurrences(str2).sort())
);
}
function createObjOfOcurrences(str) {
@i-oliva
i-oliva / ContextProvider.js
Created September 22, 2018 16:07
ContextProvider
import React, { Component } from "react";
import Context from '../config/Context'
export default class ContextProvider extends Component {
constructor() {
super();
this.state = {
name: "Ismael"
};
}