Skip to content

Instantly share code, notes, and snippets.

View rririanto's full-sized avatar
🏠
Working from home

Rahmat Ramadhan rririanto

🏠
Working from home
View GitHub Profile
@rririanto
rririanto / Ghost-Download-Image.py
Created April 18, 2021 04:29
Creating Python Script To Restore The Image To Ghost CMS
import json
import os
import wget #pip install wget
from pathlib import Path
JSON_PATH = "<YOUR JSON PATH>"
def wget_image(image_url):
filename = os.path.basename(image_url)
@rririanto
rririanto / Ghost-Admin-API.py
Last active April 25, 2024 05:33
Python Ghost Insert Posts using Admin API from Ghost Wordpress Plugin
import requests # pip install requests
import jwt # pip install pyjwt
from datetime import datetime as date
import json
import os
CONTENT_API = "<YOUR CONTENT API>"
ADMIN_API = "<YOUR ADMIN API>"
API_URL = "<URL ENDPOINT>"
version: "3.9"
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
sudo /opt/bitnami/apps/ghost/bnconfig --disable_banner 1
ghost start --no-prompt
cd /opt/bitnami/apps/ghost/lib/
echo '{}' | sudo tee package.json
sudo npm i ghost-cli@latest
sudo npm i ghost-storage-adapter-s3@latest
cd /opt/bitnami/apps/ghost/htdocs/
ghost update v3
ghost update
cp -rf config.production.json backup.json
@rririanto
rririanto / config.production.json
Last active April 6, 2021 17:53
Ghost Production Config
{
"url": "https://REPLACETHIS.com",
"server": {
"port": 2368,
"host": "127.0.0.1"
},
"database": {
"client": "mysql",
"connection": {
"host": "localhost",
@rririanto
rririanto / meta.html
Created March 10, 2021 04:55
workolio metatag
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link type="image/png" href="/favicon-32x32.png" rel="icon" sizes="32x32" />
<link type="image/png" href="/favicon-16x16.png" rel="icon" sizes="16x16" />
<title>Find the best tech Jobs and IT Jobs in Vietnam | Workolio</title>
<meta name="description" content="Kho việc làm CNTT và IT chất lượng nhất tại Việt Nam | Workolio" />
<link rel="canonical" href="https://test.workolio.com" />
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta property="og:site_name" content="Workolio" />
# startups.html
{% load static %}
{% block css %}
<link rel="preload" href="{% static 'css/startups.css' %}" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="{% static 'css/startups.css' %}">
</noscript>
{% endblock %}
@rririanto
rririanto / Gruntfile.js
Created March 5, 2021 18:13
Grunt File multiple tasks
module.exports = function (grunt) {
grunt.initConfig({
uncss: {
home: {
files: [{
nonull: true,
src: ['http://localhost:8000/'],
dest: 'apps/static/css/portal.css'
}]
},
@rririanto
rririanto / Gruntfile.js
Created March 5, 2021 17:28
Gruntfile.js with gzip
module.exports = function(grunt) {
grunt.initConfig({
uncss: {
dist: {
files: [{
nonull: true,
src: ['http://localhost:8000/'],
dest: 'apps/static/css/styles.css'
}]
},
@rririanto
rririanto / Gruntfile.js
Last active March 5, 2021 17:35
Uncss Gruntfile
module.exports = function(grunt) {
grunt.initConfig({
uncss: {
dist: {
files: [{
nonull: true,
src: ['http://localhost:8000/'],
dest: 'apps/static/css/styles.css'
}]
},