Skip to content

Instantly share code, notes, and snippets.

@jasti
jasti / amphtml-ads-ecosystem
Last active November 7, 2018 05:00
Current status of AMPHTML ads across the 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/
| Header | Header | Right |
| ------ | ------ | -----: |
| Cell | Cell | $10 |
| Cell | Cell | $20 |
'''
Created on Aug 27, 2014
@author: vj
'''
import urllib2
import re
from bs4 import BeautifulSoup
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 January 17, 2014 03:25
Commands to link your private key on the mac and connect to the AWS service
# 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 January 13, 2014 02:12
Restrict the size of the div, so it forces bootstrap to create a scrollbar
.scrollable {
height: 100px;
overflow: auto;
}
<div class = "scrollable">
</div>
@jasti
jasti / JqueryResponse
Created January 13, 2014 02:10
Interpreting a Jquery response
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) {