sudo apt-get updatesudo apt-get install -y libssl1.0.0 opensslopenssl version -aand confirm the "built on" date is >= 2014-04-07sudo lsof -n | grep ssl | grep DELand restart all listed services.
Repeat #4 until no results are returned.
| cd ~ | |
| ##If you want to install OpenJDK | |
| #sudo apt-get update | |
| #sudo apt-get install openjdk-8-jre-headless -y | |
| ###Or if you want to install Oracle JDK, which seems to have slightly better performance | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| sudo apt-get install oracle-java8-installer |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| pip install networkx distance pattern | |
| In Flipboard's article[1], they kindly divulge their interpretation | |
| of the summarization technique called LexRank[2]. |
| #!/bin/sh | |
| apt-get update | |
| apt-get update -y safe-upgrade | |
| apt-get install -y build-essential | |
| apt-get install -y python-dev python-setuptools | |
| easy_install pip | |
| echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list | |
| wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc |
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
| # NEW WAY / EASY WAY | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.0.deb | |
| sudo dpkg -i elasticsearch-0.90.0.deb |
| /** | |
| * A {@link HttpRequest.ConnectionFactory connection factory} which uses OkHttp. | |
| * <p/> | |
| * Call {@link HttpRequest#setConnectionFactory(HttpRequest.ConnectionFactory)} with an instance of | |
| * this class to enable. | |
| */ | |
| public class OkConnectionFactory implements HttpRequest.ConnectionFactory { | |
| private final OkHttpClient client; | |
| public OkConnectionFactory() { |
| #!/usr/bin/env python | |
| # | |
| # Copyright 2010 Facebook | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may | |
| # not use this file except in compliance with the License. You may obtain | |
| # a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |
| <?php | |
| // load the image you want to crop | |
| $image = imagecreatefrompng('sample.png'); | |
| $width = imagesx($image); | |
| $height = imagesy($image); | |
| // create masking | |
| $mask = imagecreatetruecolor($width, $height); | |
| $transparent = imagecolorallocate($mask, 255, 0, 0); |