Skip to content

Instantly share code, notes, and snippets.

View GhazanfarMir's full-sized avatar
:octocat:
Code is LOVE

Ghazanfar Mir GhazanfarMir

:octocat:
Code is LOVE
  • Reading - UK
View GitHub Profile
@hivepress
hivepress / functions.php
Created December 7, 2022 15:55
Change the Add Details page title for listings #hivepress #listings
<?php
add_filter(
'hivepress/v1/routes',
function( $routes ) {
$routes['listing_submit_details_page']['title'] = 'Custom title here';
return $routes;
},
1000
);
@Suhas-G
Suhas-G / Deploying Django with Gunicorn, Nginx and MySQL on Ubuntu 18.04.md
Last active September 9, 2024 19:00
Deploying Django with Gunicorn, Nginx and MySQL on Ubuntu 18.04

Deploying Django with Gunicorn, Nginx and MySQl on Ubuntu 18.04

Setting up software

  1. Update ubuntu software repository
  2. Install
    1. nginx - Serve our website
    2. mysql-server and libmysqlclient-dev - For database
    3. Python 3
  3. ufw - Firewall for our system
<?php
/**
* Generate a secure token.
*
* @url http://stackoverflow.com/questions/18910814/best-practice-to-generate-random-token-for-forgot-password
*/
function generateToken($length = 40)
{
return bin2hex(random_bytes($length));
@ivanvermeyen
ivanvermeyen / !NOTE.md
Last active March 15, 2023 05:25
Setup a Laravel Storage driver with Google Drive API
@leonardofed
leonardofed / README.md
Last active April 27, 2025 19:47
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@gubatron
gubatron / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Last active October 12, 2024 22:57
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@pete-otaqui
pete-otaqui / bumpversion.sh
Created December 2, 2012 11:08
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
@Steven-Rose
Steven-Rose / gist:3943830
Created October 24, 2012 04:27
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
@retgef
retgef / pug-bomb.php
Created June 24, 2012 07:46
Pug Bomb API Endpoint WordPress Plugin
<?php
/*
Plugin Name: Pug Bomb API Endpoint
Description: Adds an API endpoint at /api/pugs/$n_pugs
Version: 0.1
Author: Brian Fegter
Author URL: http://coderrr.com
*/
class Pugs_API_Endpoint{