I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
- 1 | |
the image uses the full width or full height of the div | |
we always see all the image, nothing is cropped | |
<div class="container"></div> | |
.container { | |
width: 500px; | |
height: 300px; | |
border: 1px solid black; | |
background-image: url("http://placehold.it/200x400"); | |
background-repeat: no-repeat; |
--- | |
- hosts: all | |
remote_user: ubuntu | |
vars: | |
app_repo: [email protected]:****/****.git | |
app_id: my_app | |
app_folder: /home/ubuntu/my_app | |
log_folder: /home/ubuntu/my_app_logs | |
tasks: | |
- name: git clone |
class AsynctestController < ApplicationController | |
require "em-synchrony/em-http" | |
def test | |
EventMachine.synchrony do | |
http = EventMachine::HttpRequest.new("https://www.google.co.uk/").get | |
render :json => {result: http.response} |
def self.uniq! queue_name | |
seen_already = Set.new | |
Sidekiq::Queue.new(queue_name).each { |job| | |
key = { job.klass => job.args } | |
key.in?(seen_already) ? job.delete : seen_already << key | |
} | |
end |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body{ | |
font-family: sans; | |
padding: 10px; | |
} | |
svg path{ |
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
This is a mix between two sources:
- http://www.alfielapeter.com/posts/8-transferring-s3-bucket-contents-between-accounts-with-s3cmd
- and http://blog.techopsguru.com/2011/12/s3-bucket-copying-with-multiple-accounts.html
basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts
Basically the idea there is:
- we allowe the destination account to read the source bucket (in the console for the source account)
- we log as the destination and start the copy
public class ಠ_ಠAttribute : Attribute | |
{ | |
} | |
[ಠ_ಠ] | |
public class Manager | |
{ | |
// 1000s of lines here | |
} |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.