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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| import time | |
| import boto3 | |
| import botocore | |
| def main(): | |
| db_identifier = 'yourDBID' | |
| rds = boto3.client('rds') | |
| try: |
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
| from slackclient import SlackClient | |
| # Don't prefix the # | |
| channel_name = 'apitest' | |
| # Your API key is actually found at https://api.slack.com/web | |
| token = 'your API key' | |
| sc = SlackClient(token) | |
| sc.rtm_connect() |
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
| cmd_args = ['cat', 'somefile.txt'] | |
| print subprocess.list2cmdline(cmd_args) |
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
| $ whois getcoupons.pw | |
| Domain ID:CNIC-DO2751397 | |
| Domain Name:GETCOUPONS.PW | |
| Created On:2014-05-20T18:54:45.0Z | |
| Last Updated On:2014-05-25T18:57:08.0Z | |
| Expiration Date:2015-05-20T23:59:59.0Z | |
| Status:clientTransferProhibited | |
| Status:serverTransferProhibited | |
| Registrant ID:L24FVEUTOVCIHDJM | |
| Registrant Name:WhoisGuard Protected |
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
| function searchByKeyword() { | |
| var results = YouTube.Search.list("id,snippet", | |
| {q : "google apps script", maxResults: 25}); | |
| for(var i in results.items) { | |
| var item = results.items[i]; | |
| Logger.log("[%s] Title: %s", item.id.videoId, item.snippet.title); | |
| } | |
| } |
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
| try { | |
| // Make your Google API call | |
| } catch (GoogleJsonResponseException e) { | |
| GoogleJsonError error = e.getDetails(); | |
| // Print out the message and errors | |
| } |
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
| #!/usr/bin/python | |
| import httplib2 | |
| import os | |
| import sys | |
| from apiclient.discovery import build | |
| from oauth2client.file import Storage | |
| from oauth2client.client import flow_from_clientsecrets | |
| from oauth2client.tools import run |
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
| buildscript { | |
| repositories { | |
| maven { | |
| url 'http://repo1.maven.org/maven2' | |
| } | |
| } | |
| dependencies { | |
| classpath 'com.android.tools.build:gradle:0.4' | |
| } |
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
| import java.io.ByteArrayOutputStream; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.security.MessageDigest; |
NewerOlder