Skip to content

Instantly share code, notes, and snippets.

View mayeenulislam's full-sized avatar
🤖
AI won't replace you

Mayeenul Islam mayeenulislam

🤖
AI won't replace you
View GitHub Profile
@supersonictw
supersonictw / ollama-export.sh
Last active October 23, 2024 02:46
Ollama Model Export Script
#!/bin/bash
# Ollama Model Export Script
# Usage: bash ollama-export.sh vicuna:7b
# License: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553
# Interrupt if any error occurred
set -e
# Declare
@AminulBD
AminulBD / bootstrap.sh
Last active November 9, 2024 11:28
Ubuntu Server LEMP Setup script
#!/bin/bash
DEBIAN_FRONTEND="noninteractive"
# Default values for parameters
DEFAULT_PHP_VERSION=8.3
DEFAULT_NODE_VERSION=20
DEFAULT_DOMAIN="example.test"
DEFAULT_USER="example"
DEFAULT_MYSQL_PASSWORD=$(openssl rand -base64 10)
@obiPlabon
obiPlabon / do-shortcode-callback.php
Created March 8, 2021 09:56
Call a shortcode function by tag name
<?php
/**
* Call a shortcode function by tag name.
*
* @param string $tag The shortcode whose function to call.
* @param array $atts The attributes to pass to the shortcode function. Optional.
* @param array $content The shortcode's content. Default is null (none).
*
* @return string|bool False on failure, the result of the shortcode on success.
*/
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 15, 2024 08:20
crack activate Office on mac with license file
@nepsilon
nepsilon / how-and-why-to-sign-your-commits-with-gpg.md
Last active June 30, 2017 22:21
How and why to sign your commits with GPG? — First published in fullweb.io issue #105

How and why to sign your commits with GPG?

When a team signs their commits, it’s easy to verify the commits are actually from the team members.

If you don’t have a GPG key yet, generate one with gpg --gen-key. Enter the info at the prompt, and then type gpg --list-secret-keys --keyid-format LONG to view your key info. At the line starting with sec, the string between the / and the space is your PUBLIC_KEY_ID. Note it down, and add run the following command to instruct git to use it:

git config user.signingkey PUBLIC_KEY_ID
git config gpg.program gpg
git config commit.gpgsign true
@nepsilon
nepsilon / how-to-secure-your-site-with-https.md
Last active August 9, 2018 11:19
How to secure your site with HTTPS? — First published in fullweb.io issue #101

How to secure your site with HTTPS?

With HTTP everything is visible when traveling on the Internet. By generating an SSL certificate and configuring your webserver you can force browsers to use HTTPS. Here is how to proceed:

# 1. Install letsencrypt
sudo pip install letsencrypt
@croxton
croxton / SSL-certs-OSX.md
Last active October 26, 2024 19:20 — forked from leevigraham/Generate ssl certificates with Subject Alt Names on OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@squarestar
squarestar / install-wp-plugins.php
Last active April 20, 2024 08:02
Programmatically install and activate wordpress plugins
<?php
/**
* Programmatically install and activate wordpress plugins
*
* Usage:
* 1. Edit the $pluginSlugs array at the beginning of this file to include the slugs of all the
* plugins you want to install and activate
* 2. Upload this file to the wordpress root directory (the same directory that contains the
* 'wp-admin' directory).
* 3. Navigate to <your-domain-wordpress-root>/install-wp-plugins.php (If wordpress is installed
@nepsilon
nepsilon / 5-ways-to-check-if-a-string-contains-a-substring-in-avascript.md
Last active May 28, 2024 22:27
5 ways to check if a string contains a substring in Javascript — First published in fullweb.io issue #89

5 ways to check if a string contains a substring in Javascript

1. ES6 .includes():

var S = "fullweb";
S.includes("web");

2. RegExp .search():

@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active August 9, 2024 14:40
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}