Skip to content

Instantly share code, notes, and snippets.

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

Md. Sumon Islam sumonst21

🏠
Working from home
View GitHub Profile
@indexzero
indexzero / PRINCIPALS.md
Last active November 10, 2023 03:50
Principles of Note: a list of select principles that have been particularly useful in helping design, refine, and debug complex systems (both computer & human)

Principles of Note

A list of select principles that have been particularly useful in helping design, refine, and debug complex systems (both computer & human)

Any organization that designs a system (defined broadly) will produce a design hose structure is a copy of the organization's communication structure.

@mahdyar
mahdyar / cPanel.yml
Created September 8, 2021 20:56
Deploy to cPanel with GitHub Actions (FTP)
name: Deploy to cPanel
on:
push:
branches:
- master
jobs:
FTP-Deploy-Action:
name: FTP-Deploy-Action
runs-on: ubuntu-latest
steps:
@sumonst21
sumonst21 / sessions.php
Created August 27, 2021 04:12 — forked from fdorantesm/sessions.php
PHPSESSID Helper functions
<?php
function decode_session($data){
$temp = $_SESSION;
session_decode($data);
$out = $_SESSION;
$_SESSION = $temp;
return $out;
}
@wpmu-authors
wpmu-authors / AJAX-Action-Hook-Plugin-Functions.php
Created April 30, 2021 19:26
AJAX-Action-Hook-Plugin-Functions.php
<?php // used here only for enabling syntax highlighting. Leave this out if it's already included in your plugin file.
// define the actions for the two hooks created, first for logged in users and the next for logged out users
add_action("wp_ajax_my_user_like", "my_user_like");
add_action("wp_ajax_nopriv_my_user_like", "please_login");
// define the function to be fired for logged in users
function my_user_like() {
// nonce check for an extra layer of security, the function will exit if it fails
@iver
iver / nginx.cors.conf
Last active September 20, 2022 21:24 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "global/cors.conf"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include global/cors.conf;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@barbietunnie
barbietunnie / download-old-chrome-versions.md
Last active April 23, 2024 10:56
How to download old versions of Chrome

How to download old versions of Chrome

Click here to download old versions of Chrome for Linux, Mac and Windows.

The download_url field of the desired section houses the URL to the download.

Alternatively, for not too old versions, you can get it directly here.

@Aldaviva
Aldaviva / Windows 10 services.md
Last active April 14, 2024 04:25
Safety of disabling services in Windows 10

These settings apply to a normal, functioning Windows 10 Pro desktop with

  • wired Ethernet
  • Bluetooth
  • IPv6
  • no Wi-Fi
  • no touch screen

Safe to disable

|Display Name|Name|Notes|

@sumonst21
sumonst21 / generate_resize_thumb.sh
Created July 20, 2020 04:01
Check if thumbnail exists else generate resized thumbnail from original image
#! /bin/bash
for filename in *.jpg; do
FILE="thumbnails/$filename"
if [ ! -f "$FILE" ]; then
echo "$FILE does not exist."
convert $filename -resize 90x140! "thumbnails/$filename"
echo "Thumb Generated!"
fi
done
@jevakallio
jevakallio / readme.md
Last active April 22, 2024 15:51
`adb pull` from app data directory without root access

TL;DR;

com.package.name is your app identifier, and the file path is relative to the app user's home directory, e.g. '/data/user/0/com.package.name.

adb shell run-as com.package.name cp relative/path/file.ext /sdcard
adb pull /sdcard/file.ext

See long explanation below.

@AetherEternity
AetherEternity / user.js
Last active May 3, 2023 22:57
Silent firefox
// Mozilla User Preferences
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile (create it if it doesn't exist).
//
// Profile folder location on different systems:
// Windows: C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default
// Mac OS X: Users/<username>/Library/Application Support/Firefox/Profiles/xxxxxxxx.default
// Linux: /home/<username>/.mozilla/firefox/xxxxxxxx.default