Skip to content

Instantly share code, notes, and snippets.

View madalinignisca's full-sized avatar
🏡
Open for business

Madalin Ignisca madalinignisca

🏡
Open for business
View GitHub Profile
@madalinignisca
madalinignisca / cloud-init.sh
Last active July 19, 2022 18:26
WordPress on MicroK8s
#!/bin/bash
set -euo pipefail
USERNAME=wpk8s # TODO: Customize the sudo non-root username here
# Create user and immediately expire password to force a change on login
useradd --create-home --shell "/bin/bash" --groups sudo "${USERNAME}"
passwd --delete "${USERNAME}"
chage --lastday 0 "${USERNAME}"
@madalinignisca
madalinignisca / mrfixit.chromium.flags.sh
Created February 1, 2021 08:20
suggested chromium flags that make chromium fast on pinebook pro
# Default settings for chromium-browser. This file is sourced by /bin/sh
# from /usr/bin/chromium-browser
CHROMIUM_FLAGS="$CHROMIUM_FLAGS \
--disable-low-res-tiling \
--num-raster-threads=6 \
--profiler-timing=0 \
--disable-composited-antialiasing \
--test-type \
--show-component-extension-options \
--ignore-gpu-blacklist \
@madalinignisca
madalinignisca / copy-text-from-ssh.bat
Created November 20, 2020 10:38
Copy to windows clipboard from a linux server with ssh
ssh user@yourhost "cat /etc/php/7.4/fpm/php.ini" | clip
@madalinignisca
madalinignisca / ServeCommand.php
Created October 24, 2020 06:19
Laravel Serve Command default to host 0.0.0.0
<?php
namespace App\Console\Commands;
use Illuminate\Foundation\Console\ServeCommand as OriginalServeCommand;
class ServeCommand extends OriginalServeCommand
{
protected function getOptions()
{
@madalinignisca
madalinignisca / Guardfile
Created June 19, 2020 22:49
Reference Guardfile at railstutorial.org/guardfile
require 'active_support/core_ext/string'
# Defines the matching rules for Guard.
guard :minitest, spring: "bin/rails test", all_on_start: false do
watch(%r{^test/(.*)/?(.*)_test\.rb$})
watch('test/test_helper.rb') { 'test' }
watch('config/routes.rb') { interface_tests }
watch(%r{app/views/layouts/*}) { interface_tests }
watch(%r{^app/models/(.*?)\.rb$}) do |matches|
"test/models/#{matches[1]}_test.rb"
end
@madalinignisca
madalinignisca / settings.ini
Created May 19, 2020 21:17
Set dark theme if available for any GTK 3 theme ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-application-prefer-dark-theme = true
@madalinignisca
madalinignisca / apt.conf
Last active November 20, 2019 14:55
apt configuration for a clean, small, ideal debian/ubuntu based installation.
APT::Install-Recommends "false";
APT::Install-Suggests "false";
@madalinignisca
madalinignisca / cool.css
Last active August 1, 2019 08:14
some cool css properties
div {
/* this is the cool smooth background gradient on aws.amazon.com */
background-image: linear-gradient(0deg,#eaeded 0,#fff);
}
@madalinignisca
madalinignisca / .vimrc
Created July 26, 2019 17:55
My vimrc. A hybrid to work on both Linux and MacOS.
" Some plugins, colors and other things are expected.
" Check another time for complete instructions
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.