Skip to content

Instantly share code, notes, and snippets.

<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@wimarbueno
wimarbueno / mamp-php-gmp.md
Created February 24, 2021 14:40 — forked from aurelioluiz/mamp-php-gmp.md
How to install GMP extension for PHP 7.2 using MAMP

Installing GMP extension for PHP 7.2 using MAMP

You have to build the GMP extension from the PHP source code. First install Autoconf and GMP using Homebrew.

brew install autoconf gmp

Download and unpack PHP.

// resources/js/models/Model.js
export default class Model {
constructor (attributes = {}) {
this.fill(attributes)
}
static make (attributes = {}) {
return Array.isArray(attributes)
? attributes.map(nested => new this(nested))
//IMPORTANT - install this before: npm i child-process-promise --save-dev
/*
put this in your package.json script:
"install-collection": "node install-collection.js"
npm run install-collection <user>.<collection>
*/
const exec = require('child-process-promise').exec;
const args = process.argv;
const remote = args[2];
@ccheney
ccheney / httpInterceptor.js
Last active May 7, 2022 05:12
axios http interceptor with minimum delayed response
const httpInterceptor = {
setupInterceptors: () => {
axios.interceptors.request.use((config) => {
return {
...config,
p0: performance.now(),
};
}, (error) => Promise.reject(error));
axios.interceptors.response.use(async (response) => {
@learner-long-life
learner-long-life / Rinkeby.md
Last active August 30, 2022 22:32
How to get on Rinkeby Testnet in less than 10 minutes

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

@berteltorp
berteltorp / stopord.txt
Last active December 13, 2023 14:41
Dansk stopords liste / Danish stopwords. A stop word is a commonly used word (such as “the”, “a”, “an”, “in”) that a search engine has been programmed to ignore, both when indexing entries for searching and when retrieving them as the result of a search query.
ad
af
akkurat
al
aldrig
alene
alle
allerede
alligevel
alt
@soyuka
soyuka / ObjectListener.php
Last active July 12, 2023 06:17
Streaming big json files the good way with php with https://soyuka.me/streaming-big-json-files-the-good-way/
<?php
namespace Fry;
use JsonStreamingParser\Listener;
/**
* This implementation allows to process an object at a specific level
* when it has been fully parsed
*/
class ObjectListener implements Listener
{
@mccannf
mccannf / README.markdown
Created January 17, 2012 22:36
D3 Drag Rectangle with drag handles

This is an example of the power of the D3 library and how you can use the drag behavior of D3 to control the position and shape of the SVG element.