Skip to content

Instantly share code, notes, and snippets.

View iryston's full-sized avatar

Igor R. Plity iryston

View GitHub Profile
@RowboTony
RowboTony / delete_filter_format.drush.php
Created November 17, 2023 04:37
Drush scripts to clean up database issues for Drupal 7 migrations
<?php
/**
* Drush script to delete a text format (filter format) from the Drupal 7 database.
*
* Usage:
* drush scr path/to/delete_filter_format.drush.php --filter_format=filtered_html [--dry-run]
*/
// Drush bootstrap for full Drupal access.
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
@VonHeikemen
VonHeikemen / astronvim-setup.lua
Last active October 3, 2023 11:36
Separate astronvim's configuration from Neovim's default.
--- For details of usage and explanation see:
--- https://dev.to/vonheikemen/how-to-install-astronvim-without-overriding-your-existing-neovim-configuration-1nke
local path_sep = vim.loop.os_uname().version:match('Windows') and '\\' or '/'
local join = function(...) return table.concat({...}, path_sep) end
local getpath = function(arg)
local path = vim.fn.stdpath(arg)
return vim.fn.substitute(path, [[\(.*\)\zsnvim]], 'astronvim', '')
end
#!/usr/bin/env bash
set -e
main() {
previous_file="$1"
file_to_edit=`select_file $previous_file`
if [ -n "$file_to_edit" ] ; then
"$EDITOR" "$file_to_edit"
main "$file_to_edit"
@abstractart
abstractart / books.md
Last active June 18, 2024 16:10
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

{
"syntax": "less",
"rules": {
"color-hex-case": ["lower", {
"message": "HEX цвета буквами строчными указывать следует"
}],
"color-named": ["never", {
"message": "Цвета ключевыми нельзя словами писать"
}],
"color-no-invalid-hex": [true, {
@fevangelou
fevangelou / my.cnf
Last active July 14, 2024 17:45
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@Greg-Boggs
Greg-Boggs / README.md
Last active August 30, 2023 10:09
Drupal Site Building Best Practices

Better Drupal Building

  • Custom glue should be accomplished with configuration first and PHP code second.

Configuration Management and Dependencies

  • Use Composer (or Drush Make) to build your project and it's depencies.
  • Store your work in files.
  • Set your config directory above the webroot.
  • Sync UUIDs across all developers.

Theming

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active July 16, 2024 17:25
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)