Skip to content

Instantly share code, notes, and snippets.

View iryston's full-sized avatar

Igor R. Plity iryston

View GitHub Profile
@iryston
iryston / starship.toml
Created October 20, 2023 19:17
Starship configuration
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = "$all$time$jobs$character"
[jobs]
# symbol = ""
format = "[\\[]($style)[$number]($style)[\\]]($style) "
number_threshold = 1
# symbol_threshold = 0
@iryston
iryston / wezterm.lua
Last active October 25, 2023 06:06
Wezterm config
local wezterm = require("wezterm")
local act = wezterm.action
local mux = wezterm.mux
local function scheme_for_appearance(appearance)
local scheme = {}
if appearance:find("Dark") then
scheme.name = "BlulocoDark"
scheme.background = "#202324"
scheme.cursor_fg = "#202324"
@iryston
iryston / macos_ramdisk_setup.sh
Created June 9, 2020 17:49
Create RAM Disk in MacOS and move some cache folders to RAM
#!/bin/bash
## Read and edit this file.
## Run it once as a root.
FILE="/Library/Scripts/ramdisk.sh"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
@iryston
iryston / gulpfile.js
Last active August 23, 2019 22:42
gulpfile.js example
'use strict';
const autoprefixer = require('autoprefixer');
const browserSync = require('browser-sync').create();
const changed = require('gulp-changed');
const concat = require('gulp-concat');
const csso = require('gulp-csso');
const del = require('del');
const gulp = require('gulp');
const htmlmin = require('gulp-htmlmin');
@iryston
iryston / Documentation.txt
Last active March 6, 2018 07:33
Visual Studio Code extensions & settings
https://code.visualstudio.com/docs/setup/setup-overview
Command line extension management
To make it easier to automate and configure VS Code, it is possible to list, install, and uninstall extensions from the command line. When identifying an extension, provide the full name of the form publisher.extension, for example ms-python.python.
Example:
code --list-extensions
code --install-extension ms-vscode.cpptools
@iryston
iryston / gist:16d93bc9115ad23a719bcd06f9c6af93
Created February 24, 2017 18:26 — forked from opi/gist:5144388
Implements hook_language_switch_links_alter() - Alter language switch links.
<?php
/**
* Implements hook_language_switch_links_alter().
*/
function mymodule_language_switch_links_alter(array &$links, $type, $path) {
global $language;
if ($type == LANGUAGE_TYPE_INTERFACE && isset($links[$language->language])) {
foreach ($links as $langcode => &$link) {
// If no translation exists, redirect to frontpage
@iryston
iryston / drop-mysql-tables.sh
Created February 6, 2017 08:57 — forked from ticean/drop-mysql-tables.sh
Shell script to drop all tables from MySQL.
#!/bin/bash
# A shell script to delete / drop all tables from MySQL database.
# Usage: ./script user password dbnane
# Usage: ./script user password dbnane server-ip
# Usage: ./script user password dbnane mysql.nixcraft.in
# -------------------------------------------------------------------------
# Copyright (c) 2008 nixCraft project <http://www.cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
@iryston
iryston / DoIt.md
Created January 2, 2017 01:56 — forked from scotthorn/DoIt.md
Setting up Drupal 7 on AWS Ubuntu 14.04 with Nginx, Memcache, and Varnish

Percona / Ubuntu 16.04

Installing Percona Server from Percona apt repository

Fetch the repository packages from Percona web:

wget -c https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb
.col-xs-1-5,
.col-sm-1-5,
.col-md-1-5,
.col-lg-1-5 {
position: relative;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
}