This file contains 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 prefix to Ctrl-Space | |
unbind C-b | |
set -g prefix C-Space | |
bind Space send-prefix | |
# Allows for faster key repetition | |
set -s escape-time 0 | |
# Design | |
set -g status-left '#[fg=#a09f93,bg=#2d2d2d,bold] ༼ つ◕_◕ ༽つ #[fg=white,bg=#2d2d2d,nobold]#[fg=colour245,bg=#2d2d2d,bold] #(whoami) #[fg=colour238,bg=white,nobold]' |
This file contains 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 Team < ActiveRecord::Base | |
# Friendly ID | |
extend FriendlyId | |
friendly_id :name | |
# Rolify | |
resourcify | |
# Associations | |
belongs_to :user |
This file contains 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
require 'perseus' | |
class TeamRankedStatJob < ActiveJob::Base | |
queue_as :default | |
def perform(team) | |
## Get ready | |
client = Perseus::Client.new(Settings.rito.api_key, region: team.server) | |
## Get Info | |
entries = client.league.entries_by_team(team.full_id).values.flatten |
This file contains 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
{"TEAM-c7aa72a0-9b21-11e4-85ae-782bcb48f791": [ | |
{ | |
"queue": "RANKED_TEAM_3x3", | |
"name": "Wukong's Lancers", | |
"entries": [{ | |
"leaguePoints": 59, | |
"isFreshBlood": false, | |
"isHotStreak": false, | |
"division": "I", | |
"isInactive": false, |
This file contains 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
var PlayerChampions = React.createClass({ | |
loadChampions: function() { | |
$.ajax({ | |
url: '/api/v1/players/' + this.props.summoner + '/champions', | |
dataType: 'json', | |
success: function(data) { | |
this.setState({champions: data}); | |
}.bind(this), | |
error: function(xhr, status, err) { |
This file contains 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
// http://codepen.io/brunorcunha/pen/KIBtn | |
function requisicao(acao, id, callback, erro) | |
{ | |
var url = ''; | |
if(acao == 'time') url = "retrieveInProgressSpectatorGameInfo/"; | |
else if(acao == 'liga') url = "getLeagueForPlayer/"; | |
else if(acao == 'stats') url = "retrievePlayerStatsByAccountId/"; | |
else if(acao == 'nivel') url = "getSummonerByName/"; | |
else if(acao == 'champs') url = "retrieveTopPlayedChampions/"; |
This file contains 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
<div> | |
<input type="text" className="form-control ItemSearch" value={this.state.searchString} onChange={this.handleChange} placeholder="Search Items" /> | |
<ul className="ItemSearchList"> | |
{ | |
items.slice(0,3).map(function(item){ | |
return ( | |
<li key={item.id} > | |
<div className="media"> | |
<div className="media-left"> |
This file contains 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
[ | |
{ | |
"name":"Afghanistan", | |
"alpha-2":"AF", | |
"alpha-3":"AFG", | |
"country-code":"004", | |
"iso_3166-2":"ISO 3166-2:AF", | |
"region-code":"142", | |
"sub-region-code":"034" | |
}, |
This file contains 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
# 1st Example | |
raw_metas = file_content.scan( /\A\/\/\s==UserScript==(\w|\W)*\/\/\s==\/UserScript==$/ ) | |
raw_metas.split(/\r\n|\n|\r/).each do |line_with_meta| | |
#each line is structured like @attribute<space>value | |
end | |
#so in this loop, we need another regex to get the attribute's name, and the value | |
# 2nd Example | |
raw_metas.split(/\r\n|\n|\r/).each do |line_with_meta| | |
attribute_name = line_with_data.scan(/@\w+/) |
This file contains 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 Logic::JavascriptParser | |
def initialize(content) | |
@raw_content = content | |
JavascriptParser.new(params[:code_content]) | |
end | |
def execute | |
self.parse | |
self.persist! |