Skip to content

Instantly share code, notes, and snippets.

Raphaël Huchet rap2hpoutre

Block or report user

Report or block rap2hpoutre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chuckplantain / executionOrderJestJasmine.js
Created Apr 5, 2018
Execution order of async Jest/Jasmine test code
View executionOrderJestJasmine.js
* Demonstrate execution order of code in Jest/Jasmine
function resolveAfter2Seconds(message) {
return new Promise((resolve) => {
setTimeout(() => {
}, Math.ceil(Math.random() * 5000))
yann-yinn / index.jsx
Created Apr 1, 2018
Get content from graphCMS with Next.js
View index.jsx
import React from "react";
import { request, GraphQLClient } from "graphql-request";
export default class HomePage extends React.Component {
static async getInitialProps() {
const query = `{
allPosts {
coverImage {
NoelDeMartin / Browser.php
Created Nov 30, 2017
Laravel Dusk Mail mocking proposal
View Browser.php
namespace Tests\Browser\Dusk;
use Tests\Testing\MailFake;
use Laravel\Dusk\Browser as BaseBrowser;
class Browser extends BaseBrowser {
public function fake($service) {
brianboyko /
Last active Oct 2, 2019
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

calebporzio / timer_helpers.php
Last active Aug 18, 2019
A simple helper function and macro for timing php scripts and eloquent queries
View timer_helpers.php
// Helper function.
if (! function_exists('timer')) {
function timer($expression)
$start = microtime(true);
if ($expression instanceof Closure) {
imliam / pagination.blade.php
Last active Nov 26, 2018
Laravel 5 - Bootstrap 4 Pagination
View pagination.blade.php
| Laravel 5, Bootstrap 4 Pagination
| A partial view to handle pagination for collections in Laravel's query
| builder or Eloquent ORM, styled with Bootstrap 4.
| The pagination displays like the following, where * denotes the current
forairan /
Last active Sep 13, 2019
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
class PhpJava {
static function main() {
"Hello World!");

Installing OpenSSL for Rust on Windows with MSVC

When using MSVC Rust on Windows, everything typically works out of the box, up until you decide to do some web stuff with hyper. Suddenly a new dependency, openssl, is failing to build and you have no idea how to fix it. Fortunately this guide is here to save you!

WARNING: OpenSSL 1.1 support was only added in openssl-sys = "0.9". Older versions only support up to OpenSSL 1.0.2.

  1. First you will need to download and install OpenSSL itself. You can download an installer from In particular you want the newest version and not the light version. Make sure it matches the version of Rust you have, if you're using x86_64-pc-windows-msvc you will want Win64, and if you're using i9686-pc-windows-msvc you will want Win32. For the purpose of example I have installed Win64 OpenSSL v1.0.2h.
  2. If all went well you should now have OpenSSL installed somewh
You can’t perform that action at this time.