Skip to content

Instantly share code, notes, and snippets.

View 13hakta's full-sized avatar
🎯
Focusing

Vitaly Chekryzhev 13hakta

🎯
Focusing
View GitHub Profile
@ilmesi
ilmesi / media_to_s3.py
Created April 28, 2017 18:47
Migrate media from django to S3 bucket
"""
Simple way to re-upload files on django.
Using:
Django>1.9
django-storages>1.5
boto3
"""
from django.core.files import File
from my_package.models import ModelWithImage
@vwasteels
vwasteels / getMenuHierarchically.md
Last active June 28, 2022 13:12
Retrieve menu items hierarchically in Wordpress
/**
 * Get Menu Items From Location
 *
 * @param $location : location slug given as key in register_nav_menus
 */

function getMenuItemsFromLocation($location) {
	$theme_locations = get_nav_menu_locations();
@tsolar
tsolar / phpmyadmin
Created September 3, 2013 21:00
phpmyadmin nginx config
server {
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;