Skip to content

Instantly share code, notes, and snippets.

View korrio's full-sized avatar
👽

kOrriO korrio

👽
  • Hal Finney Co.,Ltd.
  • mempool
  • X @korrio
View GitHub Profile
@afeld
afeld / gist:4952991
Last active February 8, 2022 03:13
good APIs for mashups

This list has been superseded by Public APIs. Check there for APIs with Auth: No, HTTPS and CORS Yes.


List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.

@msurguy
msurguy / eloquent.md
Last active February 8, 2022 03:13
Laravel 4 Eloquent Cheat Sheet.

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

<?php
/**
* This can be used to manually create a simple order. You can add products and some
* configurations and error pages if anything fails. This will not do an actual checkout
* and can be used to create apps that are used by cashiers.
* @author Michael Sebel <michael.sebel@blogwerk.com>
*/
class WooCommerce_ManualOrder
{
/**
@derekconjar
derekconjar / wordpress-firebase.php
Last active April 25, 2024 15:21
An example of using Firebase and WordPress together. The idea is to use WP's custom post types and metaboxes to make content management easy, and sync with Firebase so that your websites have access to a real-time JSON feed of your custom data.
<?php
/**
* All custom functions should be defined in this class
* and tied to WP hooks/filters w/in the constructor method
*/
class Custom_Functions {
// Custom metaboxes and fields configuration
@clhenrick
clhenrick / README.md
Last active April 1, 2024 14:55
PostgreSQL & PostGIS cheatsheet (a work in progress)
@vitalbone
vitalbone / keystone2heroku.md
Last active January 1, 2023 23:35
Deploying KeystoneJS to Heroku

Deploying a Keystone App to Heroku

Keystone comes completely set up to install on Heroku in a couple of steps.

1. Sign up for a Heroku account and install the Heroku Toolbelt.

Log in with it and you're ready to begin. Heroku uses git to deploy a new site, so with that in mind:

2. Create a new repository on Github and then clone it.

@gokulkrishh
gokulkrishh / media-query.css
Last active May 17, 2024 04:45
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */

Most active GitHub users in Thailand

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 29 Jul 2015 01:52:41 GMT till Fri, 29 Jul 2016 01:52:41 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 6)
@ultimagriever
ultimagriever / migrate.js
Created August 26, 2016 15:33
Migrate Mongo -> Firebase
/**
* Migrate MongoDB database to Firebase.
* Syntax: node migrate.js [-c || --collection=]<MongoDB Collection> [ [-h || --host=]<MongoDB URI>]
* If no args are provided, the MONGODB_URI
* env variable declared in the .env file
* will be used instead.
*/
const env = require('dotenv');
const firebase = require('firebase');
const express = require('express');
const server = express();
const request = require('request');
const proxy = require('http-proxy-middleware');
server.set('view engine', 'ejs');
const createProxy = (path, target) =>
server.use(path, proxy({ target, changeOrigin: true, pathRewrite: {[`^${path}`]: ''} }));