This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default | |
| tab-width 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sortedReference = [ | |
| 'ITEM-1', | |
| 'ITEM-2', | |
| 'ITEM-3', | |
| 'ITEM-4', | |
| 'ITEM-5', | |
| 'ITEM-6', | |
| 'ITEM-7', | |
| 'ITEM-8', | |
| 'ITEM-9', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": ["babel-preset-expo"], | |
| "env": { | |
| "development": { | |
| "plugins": | |
| ["transform-react-jsx-source", | |
| ["module-resolver",{ | |
| "root": ["./src"], | |
| "alias": { | |
| "screens": "./screens" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Problem: Transaction in k | |
| * List the days to buy and days to sell | |
| * Complexity | |
| * p = prices | |
| * k = transactions | |
| * | |
| * O(p + k) | |
| */ | |
| const daysToSell = (prices, k) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @seller.user_info_token = loop do | |
| token = SecureRandom.urlsafe_base64 | |
| break token unless User.exists?(user_info_token: token) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PARTS = 3 | |
| LENGTH = 4 | |
| def self.generate(options = { parts: PARTS, part_length: LENGTH }) | |
| num_parts = options.delete(:parts) | |
| length_of_parts = options.delete(:part_length) | |
| parts = [] | |
| (1..num_parts).each do |i| | |
| part = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class GooglePlayVerification | |
| require 'google/api_client' | |
| # Refer: | |
| # https://code.google.com/p/google-api-ruby-client/issues/detail?id=72 | |
| # and | |
| # http://jonathanotto.com/blog/google_oauth2_api_quick_tutorial.html | |
| # and | |
| # http://milancermak.wordpress.com/2012/08/24/server-side-verification-of-google-play-subsc/ | |
| GOOGLE_KEY = 'xxx-xxx.apps.googleusercontent.com' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') | |
| " let Vundle manage Vundle, required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "" ---------------------------------------------------------------------------- | |
| "" Random other items | |
| "" ---------------------------------------------------------------------------- | |
| " Custom ignore for ctrl-p | |
| let g:ctrlp_custom_ignore = '\v[\/]\.(DS_Storegit|hg|svn|optimized|compiled|node_modules)$' | |
| "let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git' | |
| " Ignore html in syntastic since it doesn't handle handlebars | |
| let syntastic_mode_map = { 'passive_filetypes': ['html'] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <link href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" /> | |
| <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
| <script src="//code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script> | |
| <script src="http://fb.me/react-0.3.0.js"></script> | |
| <script src="http://fb.me/JSXTransformer-0.3.0.js"></script> | |
| <meta charset="utf-8"> |