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
Console output: | |
7: def popular_tags | |
8: #Tag.find(:all) | |
9: tags = select('max(topics.tag_id) as "id", count(*) as "number_tagged", max(tags.title) as "title"').joins(:topics).group('tag_id').find(:all) | |
=> 10: binding.pry | |
11: end | |
[1] pry(Tag)> tags | |
=> [#<Tag id: 15, title: "Java">] |
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
#!/bin/sh | |
txtrst=$(tput sgr0) # Text reset | |
txtred=$(tput setaf 1) # Red | |
exit_status=0 | |
staging_modified=0 | |
grep_search="binding.pry\\|console.log\\|debugger" |
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 CreateProjectUsers < ActiveRecord::Migration | |
def change | |
create_table :project_users do |t| | |
t.integer :user_id | |
t.integer :project_id | |
t.timestamps | |
end | |
add_index :project_users, [ :user_id, :project_id], unique: true |
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
#splashcontent { | |
font-family: Arial, Helvetica, sans-serif; | |
margin:0 0 0 4px; | |
background-color:#fff; | |
width:760px; | |
position: relative; | |
height:182px; | |
background-image: url('images/banner_image.png'); | |
} |
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 Project < ActiveRecord::Base | |
attr_accessible :author, :description, :name, :user_ids | |
has_and_belongs_to_many :users | |
belongs_to :author, :class_name => "User", :foreign_key => "author" | |
end |
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
<html> | |
<head> | |
<title>Streaming</title> | |
</head> | |
<body> | |
<video controls src="http://nlds138.cdnak.neulion.com/nlds/nhl/bruins/as/live/bruins_hd_4500.m3u8"></video> | |
</body> | |
</html> |
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
CREATE TABLE d6twp_content ( | |
id int(11) NOT NULL, | |
asset_id bigint DEFAULT 0 NOT NULL, | |
title varchar(255) DEFAULT '', | |
alias varchar(255) DEFAULT '', | |
introtext text NOT NULL, | |
fulltext text NOT NULL, | |
state smallint DEFAULT 0 NOT NULL, | |
catid bigint DEFAULT 0 NOT NULL, | |
created timestamp DEFAULT 0, |
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
Some of the props that I have | |
------- | |
http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=18768 | |
http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=11333 | |
Motor | |
------ | |
(hexTronik DT750) http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=6247 |
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 ComponentSerializer < ActiveModel::Serializer | |
embed :ids | |
attributes :id, | |
:back_image, | |
:cols, | |
:front_image, | |
:name, | |
:rows | |
has_many :parts, include: true |
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
#include <iostream> | |
using namespace std; | |
int main() { | |
char name[15]; | |
cout << "Please enter your name"; | |
cin >> name; | |
OlderNewer