Skip to content

Instantly share code, notes, and snippets.

View owldesign's full-sized avatar
🔥
making stuff

Vadim Goncharov owldesign

🔥
making stuff
View GitHub Profile
@mattes
mattes / og.txt
Last active May 7, 2022 01:53
Open Graph debugger
http://ogp.me/
https://moz.com/blog/meta-data-templates-123
https://search.google.com/structured-data/testing-tool
https://developers.facebook.com/tools/debug/og/object - https://developers.facebook.com/docs/reference/opengraph
https://cards-dev.twitter.com/validator - https://dev.twitter.com/cards/types
https://developers.pinterest.com/tools/url-debugger/ - https://developers.pinterest.com/docs/rich-pins/overview/
https://developer.linkedin.com/docs/share-on-linkedin
@NSURLSession0
NSURLSession0 / cloudkit-server.php
Created February 7, 2016 21:36
CloudKit server-to-server in PHP
<?php
// Constants
$KEY_ID = 'YOUR_KEY_ID';
$CONTAINER = 'YOUR_CONTAINER';
$PRIVATE_PEM_LOCATION = 'eckey.pem'; // Store this file outside the public folder!
// Config
$url = 'https://api.apple-cloudkit.com/database/1/' . $CONTAINER . '/development/public/records/query';
$body = '{"query":{"recordType":"Articles"}}';
@lukeholder
lukeholder / import.php
Last active January 10, 2018 09:58
Basic example to import Products and their variants into Craft Commerce
<?php
namespace Craft;
// This file could be placed into your public_html folder and visited to import a cheese product.
$craft = require '../craft/app/bootstrap.php';
$craft->plugins->loadPlugins();
$newProduct = new Commerce_ProductModel();
@Potherca
Potherca / MyClass.php
Last active October 2, 2018 09:39
Loading arbitrary/custom files in Craft CMS Plugins
<?php
namespace MyVendor_MyPlugin;
class MyClass
{
/* ... */
}
/*EOF*/
@xinan
xinan / material-theme.itermcolors
Created August 1, 2015 16:18
Material Theme iTerm2 Port
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.25882352941176467</real>
<key>Green Component</key>
<real>0.21176470588235294</real>
@Topener
Topener / slack_invite.php
Last active June 26, 2022 03:05
Simple PHP script to invite slack users
<?php
/**
* This is a simple script to invite users to your slack
* Replace the subdomain and token in the variables below.
* Upload a logo called "logo.png" to the same directory for your group
* Upload a logo called "slack.png" to the same directory for slack
*/
define('SUBDOMAIN','{YOUR SUBDOMAIN HERE}');
define('TOKEN','{YOUR API TOKEN HERE}');
?>
@fiftyandfifty
fiftyandfifty / dntly-api-example.php
Created December 10, 2014 23:52
This is a simple example script for testing valid calls to the Donately API in PHP
<?php
/*
* This is a simple example script for testing valid calls to the Donately API in PHP
* Edit this script and test locally
*
* Note: if you are testing on a remote server don't put your password in this file,
* but use the auth token instead - then renew your token when you're done testing
*
* Bryan Shanaver CTO - Donately / Fiftyandfifty
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@jonathantneal
jonathantneal / README.md
Last active March 19, 2024 23:31
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@keithmancuso
keithmancuso / gist:17619fc405a621b4a11e
Last active July 28, 2020 01:03
Craft Ajax Paging
{% if craft.request.isAjax %}
{% set layout = "_ajaxLayout" %}
{% else %}
{% set layout = "_layout" %}
{% endif %}
{% extends layout %}
{% set limit = 10 %}
{% set params = { section: 'news', limit: limit} %}