Skip to content

Instantly share code, notes, and snippets.

@jasti
jasti / amphtml-ads-ecosystem
Last active Nov 7, 2018
Current status of AMPHTML ads across the ecosystem
View amphtml-ads-ecosystem
| Product | Product Type | Status | Documentation |
|-----------------------------|------------------------|----------|-------------------------------------------------------------|
| Google Web Designer | Ad Creation Tools | Launched | https://support.google.com/webdesigner/answer/7529856?hl=en |
| Celtra | Ad Creation Tools | Launched | https://www.celtra.com/contact-us/ |
| Adobe Animate | Ad Creation Tools | Beta | https://www.adobe.com/about-adobe/contact.html |
| Google Ad Manager | Ad Server/ Ad Networks | Launched | https://support.google.com/admanager/answer/6352089?hl=en |
| TripleLift | Ad Server/ Ad Networks | Launched | https://triplelift.com/ |
| Dianomi | Ad Server/ Ad Networks | Launched | https://www.dianomi.com/cms/contact/
View multi-size-cases
| Header | Header | Right |
| ------ | ------ | -----: |
| Cell | Cell | $10 |
| Cell | Cell | $20 |
View Beats.py
'''
Created on Aug 27, 2014
@author: vj
'''
import urllib2
import re
from bs4 import BeautifulSoup
View Analysis
package bigo;
import java.lang.reflect.Array;
import java.util.Arrays;
public class Analysis {
private static boolean isFirstCharA(char[] chars) {
if (chars[0] == 'A')
@jasti
jasti / ssh_ec2_aws
Created Jan 17, 2014
Commands to link your private key on the mac and connect to the AWS service
View ssh_ec2_aws
# Setting up for the first time
* Download the public key
* Copy it over to the SSH folder : mv key_for_nodejs_demo_server.pm ~/.ssh
* Check that its in the place : cd ~/.ssh
* Add a linkage : ssh -i ~/.ssh/key_for_nodejs_demo_server.pem ubuntu@ec2-75-101-178-88.compute-1.amazonaws.com( replace ec2-75-101-178-88.compute-1.amazonaws.com with the 'public DNS name' from the server.
* Change permissions so only 1 user from the mac can access : ssh -i ~/.ssh/key_for_nodejs_demo_server.pem ubuntu@ec2-75-101-178-88.compute-1.amazonaws.com
* Should have logged in like this : ubuntu@ip-10-164-108-235:-$
@jasti
jasti / ScrollableDiv
Created Jan 13, 2014
Restrict the size of the div, so it forces bootstrap to create a scrollbar
View ScrollableDiv
.scrollable {
height: 100px;
overflow: auto;
}
<div class = "scrollable">
</div>
@jasti
jasti / JqueryResponse
Created Jan 13, 2014
Interpreting a Jquery response
View JqueryResponse
Assuming your server side script doesn't set the proper Content-Type: application/json response header you will need to indicate to jQuery that this is JSON by using the dataType: 'json' parameter.
Then you could use the $.each() function to loop through the data:
$.ajax({
type: 'GET',
url: 'http://example/functions.php',
data: { get_param: 'value' },
dataType: 'json',
success: function (data) {