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
Create hexagon map | |
Each hexagon will have attributes attached to it which it modifies the game chit. | |
Example Hexagon Tile: | |
Clear | |
Road +1 Extra Movement Point | |
Example Hexagon Tile: | |
Forest -2 Movement Points | |
Chit |
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
[3] pry(#<DeliveryHandler>)> @file_response | |
=> {"FileName"=>"191018_173055001", | |
"StatusType"=>{"Code"=>"U", "Description"=>"Unread"}, | |
"Delivery"=> | |
{"PackageReferenceNumber"=>[{"Number"=>"1", "Value"=>"124575"}, {"Number"=>"2", "Value"=>"504738"}], | |
"ShipmentReferenceNumber"=>[{"Number"=>"1", "Value"=>"124575"}, {"Number"=>"2", "Value"=>"504738"}], | |
"ShipperNumber"=>"03E0R4", | |
"TrackingNumber"=>"1Z03E0R40200419931", | |
"Date"=>"20191018", | |
"Time"=>"133605", |
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
$R('#post_content', { plugins: ['', 'alignment', 'counter', 'imagemanager'], | |
imageUpload: '#{uploader_index_path}', | |
imageResizable: true, | |
imagePosition: true, | |
callbacks: { | |
image: { | |
uploadError: function(response) | |
{ | |
console.log(response.message); | |
}, |
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
def create | |
blob = ActiveStorage::Blob.create_after_upload!( | |
io: params[:file][0], | |
filename: params[:file][0].original_filename, | |
content_type: params[:file][0].content_type | |
) | |
respond_to do |format| | |
format.json do | |
render json: { |
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
$R('#post_content', { plugins: ['', 'alignment', 'counter', 'imagemanager'], | |
imageUpload: '#{upload_images_admin_category_post_path(@category,@post)}', | |
imageResizable: true, | |
imagePosition: true, | |
callbacks: { | |
image: { | |
uploadError: function(response) | |
{ | |
console.log(response.message); | |
}, |
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
image.nodes[0] . gives me this | |
<figure style="max-width: 296.861px;"><img src="/corsair.jpg" data-image="188" width="100%" height="100%"></figure> | |
now how do i select the data-image? |
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
https://imperavi.com/redactor/plugins/imagemanager/ | |
<script> | |
$R('#content', { | |
plugins: ['imagemanager'], | |
imageUpload: '/your-upload-script/', | |
imageManagerJson: '/your-folder/images.json' | |
}); | |
</script> |
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
{ | |
"id": 417, | |
"elementId": 501, | |
"siteId": 1, | |
"title": "1000928 113 street scene with old cars", | |
"dateCreated": "2019-06-07 17:22:19", | |
"dateUpdated": "2019-06-07 17:22:19", | |
"uid": "c1de5419-5df2-4f2f-8fa9-20e7abe74674", | |
"field_brochuresLink": "NULL", | |
"field_email": "NULL", |
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
before adding a related entry | |
irb(main):001:0> e = Entry.last | |
Entry Load (0.7ms) SELECT "entries".* FROM "entries" ORDER BY "entries"."id" DESC LIMIT $1 [["LIMIT", 1]] | |
=> #<Entry id: 112, title: "Route 66", of_type: nil, subtitle: nil, intro: nil, content: "<p>Lorem Ipsum sit amet, consectutuer adipiscing e...", promo: 0, author: nil, address: nil, city: nil, state: nil, zipcode: nil, lat: nil, long: nil, directions: nil, website: nil, email: nil, facebook: nil, twitter: nil, instagram: nil, pinterest: nil, meta_description: nil, meta_keywords: nil, meta_title: nil, created_at: "2019-09-17 18:49:06", updated_at: "2019-09-17 19:24:35", slug: "route-66", topic: nil, type_id: 10, facility: nil, group: nil, internet: nil, room: nil, room_amenities: nil, discounts: nil, is_featured: 0, start: nil, end: nil> | |
irb(main):003:0> e.related_entries | |
Entry Load (0.7ms) SELECT "entries".* FROM "entries" INNER JOIN "related_entries" ON "entries"."id" = "related_entries"."other_entry_id" WHERE "related_entries"."en |
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
fun = CSV.open("memberships.csv", "wb") do |csv| | |
csv << ["id", "name", "email", "street", "state", "city", "zipcode", "country", "phone" "stripe_id", "created_at"] | |
end | |
CSV.open("memberships.csv", "a+") do |csv| | |
Membership.all.each do |mem| | |
csv << [mem.id, mem.name, mem.email, mem.street, mem.state, mem.city, mem.zipcode, mem.country, mem.phone, mem.stripe_id, mem.created_at] | |
end |