Skip to content

Instantly share code, notes, and snippets.

View riazul701's full-sized avatar

Md. Riazul Hasan Rahat riazul701

View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active April 1, 2025 06:51
Git CLI Cheatsheet
@vinaydotblog
vinaydotblog / composer-install.sh
Last active April 17, 2023 11:08
Installing composer using curl
# Goto a directory you can write to:
cd ~
#get composer:
curl -s https://getcomposer.org/installer | php
# move composer into a bin directory you control:
sudo mv composer.phar /usr/local/bin/composer
# double check composer works
composer about
@stil
stil / backup.ps1
Created March 2, 2014 00:35
Differential backup with 7zip and Powershell
# CONFIGURATION
$dirToBackup = "C:\Users\John" # path to directory we back up (no following backslash)
$outputDir = "E:\bak" # path directory we store our backups (no following backslash)
$params = '-t7z', '-r', '-ms=off', '-mx1'
# THE SCRIPT
$fullBackup = $outputDir + "\full.7z"
if (Test-Path ($fullBackup)) { # Let's check whether full backup exists
Write-Host "Full backup already exists"
@labnol
labnol / google-apps-script.md
Last active April 23, 2025 21:46 — forked from junaidk/resources.md
How to Learn Google Apps Script

Learning Google Apps Script

Find the best resources for learning Google Apps Script, the glue that connects all Google Workspace services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, and more.

A good place to learn more about Google Apps Script is the official documentation available at developers.google.com. Here are other Apps Script resources that will help you get up to speed.

  1. Google Apps Script Code Samples by Amit Agarwal
  2. Google Apps Script Development - Create Google Apps Script projects locally inside VS Code - video tutorial
  3. Awesome Google Scripts by Amit Agarwal
  4. Google Developer Experts - Follow Apps Scr
@welbornprod
welbornprod / Embedded Python in BASH
Created August 14, 2014 23:22
A little trick to embed python code in a BASH script.
#!/bin/bash
# Here are some embedded Python examples using Python3.
# They are put into functions for separation and clarity.
# Simple usage, only using python to print the date.
# This is not really a good example, because the `date`
# command works just as well.
function date_time {
@subfuzion
subfuzion / curl.md
Last active April 24, 2025 13:48
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@alces
alces / ansible_local_playbooks.md
Last active February 18, 2025 04:19
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@jcavat
jcavat / Dockerfile
Last active April 15, 2025 17:40
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@vordan
vordan / locale.sh
Last active July 29, 2023 18:24
How-to fix "Warning: No support for locale: en_US.utf"
This is because locale-gen is using an archive file to store all the locales, but many utilities are still looking for the locale files.
Have a look at /usr/lib/locale/. If your output looks like this, read on:
ls /usr/lib/locale/
C.UTF-8 locale-archive
The warning isn't critical, as far as I can tell, but if it bothers you or causes troubles, try the following in a terminal window:
@jchandra74
jchandra74 / PowerShell Customization.md
Last active January 8, 2025 09:35
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.