Skip to content

Instantly share code, notes, and snippets.

@Marinski
Marinski / LearnPress REST API
Last active March 4, 2023 22:35
LearnPress REST API is a plugin which adds endpoints for LearnPress LMS to the WordPress REST API // EDIT: LearnPress released official version of a REST API for their core plugin. TheYou can read the docs in their website: https://docspress.thimpress.com/developer-learnpress/#sections-5 . LearnPress REST API has been introduced in version 4 of …
<?php
/*
* Plugin Name: LearnPress to WP Rest API
* Plugin URI: https://www.webapp.bg/wp-extensions/learnpress-rest-api
* Description: A plugin to add endpoints for LearnPress to WP REST API
* Version: 1.0
* Author: Marin Stoyanov
* Author URI: https://www.webapp.bg/
* License: GPL2
*/
@subfuzion
subfuzion / mongo-autostart-osx.md
Last active March 2, 2022 00:57
mongo auto start on OS X

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

@naveensrinivasan
naveensrinivasan / Goodreads.rb
Last active March 17, 2016 10:35
An easy way to screen scrape GoodReads recommendation's because there isn't an API.
# An easy way to get the recommendations from goodreads because there isn't an API to get the information
require 'mechanize'
require 'yaml'
require 'goodreads'
keys = YAML.load_file ENV['HOME']+'/.goodreads'
client = Goodreads::Client.new(:api_key => keys["developer_key"], :api_secret => keys["developer_secret"])
agent = Mechanize.new
page = agent.get 'http://www.goodreads.com/recommendations/'