Skip to content

Instantly share code, notes, and snippets.

@345161974
345161974 / gist:63573abdf1dc9c303d6740fb29496657
Created August 16, 2017 04:56 — forked from waqasjamal-zz/gist:7428185
Python Code for adding posts to WordPress remotely
import urllib
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods import posts
import xmlrpclib
from wordpress_xmlrpc.compat import xmlrpc_client
from wordpress_xmlrpc.methods import media, posts
import os
########################### Read Me First ###############################
'''
------------------------------------------In DETAIL--------------------------------
@ahmadawais
ahmadawais / upload-a-file.MD
Created June 18, 2017 11:07 — forked from websupporter/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:

@ecridge
ecridge / link-icloud-drive.sh
Created October 2, 2016 17:47
Add a symbolic link to iCloud Drive in Bash on macOS.
@onedr0p
onedr0p / simple_convert.py
Last active September 27, 2023 03:43
A simple script to convert media files to MP4 for a better Plex experience
# Python 2.7
import os
import sys
import time
import platform
import subprocess
import urllib2
import logging
@gorhill
gorhill / gist:ef1b62d606473c68d524
Last active February 16, 2023 21:17
Disqus comments widget: on-demand
! Title: Disqus click-to-load
# Copy-paste the static filters below into your "My filters" pane in the
# dashboard.
# Purpose is to load Disqus comments on demand only, so that no connection
# to `disqus.com` occurs by default when you land on a site which uses
# Disqus comments widget.
# Not connecting to Disqus by default is a good thing for such a
# ubiquitous server as `disqus.com`, which can be used to build a
@n8henrie
n8henrie / dbox_sync.py
Last active November 14, 2021 14:44
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
"""dbox_sync.py
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
Dependencies:
- dropbox (`pip3 install dropbox`)
Minimal modifications from:
https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py
@philgruneich
philgruneich / New from Gist.py
Created January 30, 2016 15:39
Adds Python gists to Pythonista.
# coding: utf-8
# This script downloads and opens a Gist from a URL in the clipboard.
# It's meant to be put in the editor's actions menu.
#
# It works with "raw" and "web" gist URLs, but not with gists that
# contain multiple files or non-Python files.
#
# If a file already exists, a dialog is shown that asks whether the
# new file should be renamed or replaced.
@bdougherty
bdougherty / Rules.1blockpkg
Created November 6, 2015 23:32
My custom 1Blocker packages
[{
"id": "0aefa581-b042-4f36-b39c-74daa33b682a",
"name": "Block Annoying Article Stuff",
"rules": [{
"id": "634b4fd6-e2c9-4ce4-bcf9-0d52b4c74baa",
"name": "The Atlantic",
"content": {
"trigger": {
"url-filter": "^[^:]+://+([^:/]+\\.)?theatlantic\\.com[:/]",
"url-filter-is-case-sensitive": true,
@desaiuditd
desaiuditd / wiki.md
Created August 3, 2015 13:40
Linode-EasyEngine

Easy Engine on Linode

Overall Installation of Easy Engine on Linode

Basic Linux Configurations for day to day operation

  1. Choose overall linode plan
  2. Configure Linode server based on EE Guidelines Ubuntu 64bit 14.04 LTS distro. Note: Make sure to configure swap based on guidlines link
  3. Login to Linode via SSH with root user.
  4. Setup www-data as day to day user.(document password and pass along to project lead)
  • www-data user already exists in the system. So we just need to enable its ssh login & set its password.
  • vim /etc/passwd
@jamiees2
jamiees2 / sheet.tex
Last active July 8, 2021 16:59
A template for LaTeX cheat sheets
% \documentclass[9pt,a4paper,twocolumn,landscape,oneside]{amsart}
\documentclass[9pt,a4paper,landscape,oneside]{amsart}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{fullpage}
%\usepackage{geometry}