Skip to content

Instantly share code, notes, and snippets.

@mikedamoiseau
mikedamoiseau / Convert HEIC to JPG
Created Jun 20, 2022
HEIC is the new format for IOS photos
View Convert HEIC to JPG
mogrify -format jpg *.HEIC
@mikedamoiseau
mikedamoiseau / gist:c26a089d6cb2e489d5d942a7d5ab2e29
Last active Jan 22, 2022
mount NTFS partition with write permission on OSX Monterey (12.0)
View gist:c26a089d6cb2e489d5d942a7d5ab2e29
Diskutil list
sudo mkdir /Volumes/disk2s1
sudo mount -t ntfs -o rw,auto,nobrowse /dev/disk2s1 /Volumes/disk2s1
Diskutil list will return something similar to this:
```
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
@mikedamoiseau
mikedamoiseau / .gitconfig
Created Jun 17, 2021 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
View .gitconfig
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
View facetime-ubuntu.md
@mikedamoiseau
mikedamoiseau / gist:1d05957077b3c72ab7fd5ac06330e8a5
Created Sep 26, 2020
Format drive partition to exFAT on Ubuntu
View gist:1d05957077b3c72ab7fd5ac06330e8a5
Need to install these tools:
`sudo apt install exfat-utils exfat-fuse`
Use software `Disks`
@mikedamoiseau
mikedamoiseau / ftp-download-upload.md
Created Sep 16, 2020
FTP: Download and upload through command line
View ftp-download-upload.md

Download

wget -m --user="user@login" --password="Pa$$wo|^D" ftp://server.com/

Upload

  1. Download NcFTP
  2. ~/ncftp-3.2.6/bin/ncftpput -R -v -u "USERNAME" HOST REMOTE_FOLDER LOCAL_FOLDER
@mikedamoiseau
mikedamoiseau / d8-backup-db.sh
Created Aug 28, 2020
Drupal - Backup DB using Drush
View d8-backup-db.sh
#!/bin/bash
# staging or production
DB_ENV="staging"
##### DO NOT EDIT FROM HERE #####
# Find the container
CONTAINER="$(docker ps | grep c-${DB_ENV} | awk '{print $1}')"
View d8-reinit-updb.sh
drush ev "drupal_set_installed_schema_version('aaa_sigel', 8109);"
@mikedamoiseau
mikedamoiseau / drupal-create-new-paragraph.md
Last active Aug 26, 2020
Drupal 8 - Steps to create a new paragraph
View drupal-create-new-paragraph.md
  1. Create paragraphs
  2. People > Permissions
  • View content: "Gast" and "Angemeldete Benutzer" ("Guests" and "Authenticated users")
  1. Create Image style
  • S, M, L, L 2x Image Style Name S / Image Style Name M / Image Style Name L / Image Style Name L 2x
  1. Create Responsive Image Style
  • apply the breakpoints
  1. Add fields to the parent paragraph
  2. Manage form display
View gist:c4a7b92cf831b32fbe4a5a0f0e878c5c
1. Install sshpass `sudo apt-get update && sudo apt-get install sshpass`
2. edit file `~/.bash_aliases`
3. add the line `alias name_of_alias='sshpass -f <(printf "%s\n" "our_password") ssh user@hostname'
4. compile your `.bash_aliases` file: `source .bash_aliases``