This file contains 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
{"sig":"88ae11887adbd14d4674995ee23f72a53deb49cce476c86bc0a4ee48a613ea59df5f78162b2745903cf8ae915cc96e5b61deec0fbbf07a4a358441eb7bb513f81","msghash":"07e1bd0588cf1efe24c1f320dce4081603ad40e772c25ffc3f15751d086d4e98"} |
This file contains 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
(for x <- [<<65>><>"ny"], y <- ~w(time where), do: x <> y) | |
|> Enum.reduce('Co'++~c(deing)--[101], &([&2|["\s"|&1]])) | |
|> IO.puts |
This file contains 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
defmodule Benchmark do | |
def measure(function) do | |
function | |
|> :timer.tc | |
|> elem(0) | |
|> Kernel./(1_000_000) | |
end | |
end | |
defmodule Fibonacci1 do |
This file contains 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 src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.1.2/mustache.min.js"></script> | |
<title>TODO++</title> | |
</head> | |
<body> | |
<script id="todo-list" type="x-tmpl-mustache"> |
This file contains 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
<script type='application/ld+json' class='yoast-schema-graph yoast-schema-graph--main'> | |
{ | |
"@context": "https://schema.org", | |
"@graph": [ | |
{ | |
"@type": "Organization", | |
"@id": "https://www.hallaminternet.com/#organization", | |
"name": "Hallam", | |
"url": "https://www.hallaminternet.com/", | |
"sameAs": [ |
This file contains 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 peewee import * | |
import uuid | |
import random | |
import string | |
from datetime import date, timedelta | |
db_name = 'db' | |
table_name = 'table' | |
db = MySQLDatabase(db_name, user='root', password='123456', host='localhost', port=3307) |
This file contains 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
public class Rx { | |
public static void main(String[] args) { | |
int threadNum = Runtime.getRuntime().availableProcessors() + 1; | |
ExecutorService executor = Executors.newFixedThreadPool(threadNum); | |
final Scheduler scheduler = Schedulers.from(executor); | |
Observable.range(1, 20) | |
.flatMap(x -> { | |
Observable<Integer> observableA = Observable.just(x).observeOn(scheduler).map(a -> { | |
System.out.println(Thread.currentThread().getName() + ": =observableA=> " + a); | |
return a; |
This file contains 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
ip=$(curl http://169.254.169.254/latest/meta-data/public-ipv4) | |
echo "Code Server" | |
echo "http://$ip:8443" | |
security_group=$(ec2-metadata -s | cut -d " " -f 2); | |
aws ec2 authorize-security-group-ingress --group-name $security_group --protocol tcp --port 8443 --cidr 0.0.0.0/0 | |
version="1.32.0-310" | |
wget https://github.com/codercom/code-server/releases/download/$version/code-server-$version-linux-x64.tar.gz | |
tar -xvzf code-server-$version-linux-x64.tar.gz | |
cd code-server-$version-linux-x64 | |
chmod +x code-server |
This file contains 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
package org.example; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.StatusLine; | |
import org.apache.http.client.config.RequestConfig; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.client.methods.HttpUriRequest; | |
import org.apache.http.client.protocol.HttpClientContext; | |
import org.apache.http.concurrent.FutureCallback; | |
import org.apache.http.config.Registry; |
This file contains 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
;; lein repl | |
(ns test (:require [clojure.core.async :as async] | |
[clj-http.client :as client])) | |
;; define test data | |
(def urls ["http://www.google.com" "http://www.google1.com" "http://255.255.33.44:8001/"]) | |
;; use async/go to build a async http client | |
(defn fetch-async |
OlderNewer