Skip to content

Instantly share code, notes, and snippets.

@valeryan
valeryan / Install.sh
Last active Sep 3, 2019
Dev Environment Setup on Linux
View Install.sh
#!/usr/bin/env bash
sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
sudo apt update
sudo apt install vim
sudo apt install curl
sudo apt install gnome-tweaks
sudo apt install gnome-shell-extensions
sudo apt install gnome-sushi
@valeryan
valeryan / xps-tweaks.sh
Last active Feb 5, 2019
Script to setup ubuntu 18.10 on the xps 9570
View xps-tweaks.sh
#!/usr/bin/env bash
# from https://raw.githubusercontent.com/JackHack96/dell-xps-9570-ubuntu-respin/master/xps-tweaks.sh
# Check if the script is running under Ubuntu 18.10 Cosmic Cuttlefish
if [ $(lsb_release -c -s) != "cosmic" ]; then
>&2 echo "This script is made for Ubuntu 18.10!"
exit 1
fi
# Check if the script is running as root
@valeryan
valeryan / beautify-html.js
Last active Dec 11, 2018 — forked from mpryvkin/beautify-html.js
JS Beautify hack to work with Blade directives (Laravel)
View beautify-html.js
function Beautifier(html_source, options, js_beautify, css_beautify) {
//Wrapper function to invoke all the necessary constructors and deal with the output.
html_source = html_source || '';
// BEGIN (around line 199)
console.log(html_source);
html_source = html_source.replace(/\{\{((?:(?!\}\}).)+)\}\}/g, function (m, c) {
if (c) {
c = c.replace(/(^[ \t]*|[ \t]*$)/g, '');
c = c.replace(/'/g, ''');
@valeryan
valeryan / README.md
Last active Sep 26, 2021
WSL Startup Script
View README.md

USAGE

  1. Save the services.sh file to your computer in a location like C:/tools/wsl-startup/.
  2. Download the WSL Statup.xml and import it into Task Scheduler.
  3. Modify as needed for you personal use.
View WindowsSetup.md

Deprecated in favor of Valet Wiki Page

I set up the wiki page for the valet-wsl project and moved the install guide there. This way it can have user contributions. Please have all disscussions or issues under the valet-wsl project so I can be aware of it. Please go to Valet Wsl Installation Guide

@valeryan
valeryan / SetupDevEnvironment.md
Last active Aug 14, 2018
This documents outlines the initial steps I take to setup my OSX based system for web development. This setup should provide the underlying systems needed to be able to develop using docker. This setup should work for frameworks like Laravel, Angular, Vue, etc...
View SetupDevEnvironment.md

Setup OSX Dev Environment

This documents outlines the initial steps I take to setup my OSX based system for web development. This setup should provide the underlying systems needed to be able to develop OSX. This setup should work for platforms like Laravel, Angular, Vue, MediaWiki, etc...

Homebrew Setup

Install xcode
xcode-select --install
@valeryan
valeryan / gencert.sh
Created Oct 2, 2016
Generate Self Signed SSL and added it as Trusted Root on OSX
View gencert.sh
#!/usr/bin/env bash
OPENSSL=/usr/local/Cellar/openssl/1.0.2j/bin/openssl
CERTPATH=./etc/nginx/certs/
${OPENSSL} genrsa -out ${CERTPATH}/app-wildcard.key 2048
${OPENSSL} req -new -out ${CERTPATH}/app-wildcard.csr -key ${CERTPATH}/app-wildcard.key -config openssl.cnf
${OPENSSL} x509 -req -days 3650 -in ${CERTPATH}/app-wildcard.csr -signkey ${CERTPATH}/app-wildcard.key -out ${CERTPATH}/app-wildcard.crt -extfile openssl.cnf -extensions v3_req
sudo security delete-certificate -c "*.app"
@valeryan
valeryan / .dockerignore
Last active May 1, 2018
Using docker-compose to run a mineos server
View keybase.md

Keybase proof

I hereby claim:

  • I am valeryan on github.
  • I am valeryan (https://keybase.io/valeryan) on keybase.
  • I have a public key whose fingerprint is 4C8B EA54 23FB C12A 512A 0BBC 4938 77DA 39DE A4F8

To claim this, I am signing this object: