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
| func funkytown() { | |
| let request = NSMutableURLRequest(URL: NSURL(string: "http://www.cnn.com")!) | |
| //request.HTTPMethod = "POST" | |
| //let postString = "id=13&name=Jack" | |
| //request.HTTPBody = postString.dataUsingEncoding(NSUTF8StringEncoding) | |
| request.HTTPMethod = "GET" | |
| let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { data, response, error in | |
| guard error == nil && data != nil else { // check for fundamental networking error |
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 UIKit | |
| var url = NSURL(string: "https://en.wikipedia.org/wiki/Swift_(programming_language)") | |
| var dataBinary = NSData.init(contentsOfURL: url!) | |
| var dataStr = NSString.init(data: dataBinary!, encoding: NSUTF8StringEncoding) | |
| print(dataStr) |
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 kombu.mixins import ConsumerMixin | |
| from kombu import Exchange, Connection, Queue | |
| from kombu import Producer | |
| import json | |
| import pymysql | |
| class P: | |
| def __init__(self, conn): | |
| self.connection = conn | |
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
| ConnectionFactory connFac = new ConnectionFactory(); | |
| connFac.Uri = "amqp://user:pass@172.16.5.17:5672"; | |
| connFac.UserName = "user"; | |
| connFac.Password = "pass"; | |
| IConnection conn = connFac.CreateConnection(); | |
| IModel channel = conn.CreateModel(); | |
| channel.ExchangeDeclare("TaskNotify", ExchangeType.Direct); | |
| channel.QueueDeclare("NewTask", false, false, true, null); | |
| channel.QueueBind("NewTask", "TaskNotify", "Glowfish", 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
| //This is in LibFunctions.dll | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace LibFunctions | |
| { | |
| public class InstanceThing |
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
| <?php | |
| require_once 'Net/LDAP2.php'; | |
| $cfg = array( | |
| 'binddn'=>'pokemon\nitin', //'cn=nitin,ou=users,dc=pokemon,dc=local', | |
| 'bindpw'=>'gorillacheese', | |
| 'basedn'=>'dc=pokemon,dc=local', | |
| 'host'=>'pokemon.local' | |
| ); |
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
| Oracle 12c commands | |
| To open pluggable databases: | |
| ALTER PLUGGABLE DATABASE ALL OPEN; | |
| (sometimes the pluggable database says that it is in an initializing state and requires this to be run from the container database) | |
| To get the port for the enterprise manager (usually the port is 5500 and the URL us http://localhost:5500/em ): | |
| select dbms_xdb_config.gethttpsport() from dual; |
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
| crazyegg.com | |
| Screaming Frog | |
| Piwik | |
| Optimizely | |
| MixPanel | |
| Flurry Analytics / Yahoo Analytics | |
| Clicky | |
| Mint | |
| Church Analytics | |
| KISSmetrics |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <?xml-stylesheet type="text/xsl" href="movies.xsl"?> | |
| <movies> | |
| <movie name="Pirates of the Caribbean" /> | |
| <movie name="Lord of the Rings" /> | |
| </movies> |
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
| <!doctype html><html> | |
| <head> | |
| <script> | |
| function putInStorage() { | |
| itemz = [1, 2, 3]; | |
| sessionStorage.setItem("itemz", JSON.stringify(itemz)); | |
| } | |
| function getFromStorage() { | |
| itemz = JSON.parse(sessionStorage.getItem("itemz")); |