Skip to content

Instantly share code, notes, and snippets.


Cosmin Popescu cosminpopescu14

View GitHub Profile
aromanro / CallApi.cpp
Last active Aug 16, 2020
How to use boost for a https api call
View CallApi.cpp
#include <iostream>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/beast.hpp>
#include <boost/format.hpp>
tomhicks / plink-plonk.js
Last active Feb 15, 2021
Listen to your web pages
View plink-plonk.js
View full.cs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MimeKit;
using MimeKit.Text;
geosoft1 / main.go
Last active Mar 3, 2020
Simple blockchain example
View main.go
package main
import (
type Data struct {
View FrontEnd.js
const whoAmI = async () => {
* * 1. Create the query
* * 2. Send the query and get the response as object
* * 3. If there was an error then throw it
* * 4. Otherwise return the result
// * 1
const query = "{ whoAmI { id profilePicture email confirmed } }";
mfaella /
Created Jul 8, 2019
A list-like class exposing its length as part of its type
import java.util.*;
* A linked list that exposes its length as part of its type.
* @author Marco Faella
* @version 1.0
public class L<T,N extends L<T,?>> implements Iterable<T> {
private T item;
stuart-marks /
Last active May 19, 2020
Processing Large Files in Java, Variation 7
package com.example.readFile.readFileJava;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collections;

Algorithmic layouts

You are looking at the most important, and most abundant thing on the web. You can't see it, unfortunately, because it's very small… aaaaand it's invisible — so having a magnifying glass doesn't really help here. But still.

I'm talking, of course, about U+0020; not to be confused with the band U2, who are just as ubiquitous, but far less useful.

This unicode point, representing the humble space character, is between every word, in every run of text, on every page of the web. And it has a very special characteristic: it's not sticky like glue. If two words are neighbors but there's not enough room for both of them, the space will free the second word to wrap around and start a new line.

Before getting into flexible containers, viewport meta tags, and @media breakpoints this humble character is what makes the web fundamentally 'responsive'. That is: able to change the layout of its content to suit different devices, contexts, and settings. Browser text does this automa

georgiana-gligor / most_recent.php
Last active Dec 20, 2018
preg_replace vs str_replace
View most_recent.php
$channels = array(
$res = 5;
$key = 'YOUR_KEY_HERE';