Skip to content

Instantly share code, notes, and snippets.

@victorono
victorono / PrepareAWSClientVPN.md
Created August 8, 2024 21:23 — forked from monkut/PrepareAWSClientVPN.md
Prepare AWS Client VPN for connecting to a VPC without NAT/IGW

Prepare AWS Client VPN README

Prerequisites

  • AWS Account
  • Linux(like) System
  • awscli
@victorono
victorono / CentOS-Base.repo
Created December 4, 2020 13:21
CentOS 6 became EOL on the 30th November, 3 days ago. And all the repos have been archive to https://vault.centos.org/. I have just edited my /etc/yum.repos.d/CentOS-Base.repo file to the below:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
@victorono
victorono / pg_search_conf_unaccented.sql
Created July 7, 2020 00:09 — forked from ryanpadilha/pg_search_conf_unaccented.sql
PostgreSQL - full-text search configuration
-- enable extensions
-- full-text search on postgresql
CREATE EXTENSION unaccent;
-- languages supported
CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french );
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING
FOR hword, hword_part, word WITH unaccent, french_stem;
CREATE TEXT SEARCH CONFIGURATION en ( COPY = english );
@victorono
victorono / gist:d9cb9fa01b38e40a827357a15a5061b1
Created November 1, 2018 02:15 — forked from 345161974/gist:63573abdf1dc9c303d6740fb29496657
Python Code for adding posts to WordPress remotely
import urllib
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods import posts
import xmlrpclib
from wordpress_xmlrpc.compat import xmlrpc_client
from wordpress_xmlrpc.methods import media, posts
import os
########################### Read Me First ###############################
'''
------------------------------------------In DETAIL--------------------------------

Interactive Star Rating Component (CSS Only)

An interactive CSS star rating component.

Has hover and selected states, and could be integrated into a form very easily (as underneath the visual styling it is just radio buttons). Size and margin between the stars can be easily changed by amending the sass variables.

No JS, all CSS and HTML.

Works on IE9>, Chrome, Firefox, Safari

@victorono
victorono / gitkraken-install.sh
Created February 19, 2018 20:51 — forked from seangtkelley/gitkraken-install.sh
Install Script for Gitkraken on Fedora 27 + Launcher Icon
#!/bin/bash
# Enter /opt folder (common folder for user installed programs)
# This script assumes you have proper permissions on /opt
cd /opt
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# Extract the Kraken into /opt directory
@victorono
victorono / install_generic.sh
Created March 12, 2017 02:28
Install all Google Web Fonts onto your local machine
#!/bin/bash
# OS detect
osdetect=$(uname)
file_path="unknown"
if [[ "$osdetect" == 'Linux' ]]; then
file_path="sudo mv fonts/* /usr/local/share/fonts/"
elif [[ "$osdetect" == 'Darwin' ]]; then
file_path="mv fonts/* /Library/Fonts/"
elif [[ "$osdetect" == 'Arch Linux' ]]; then
@victorono
victorono / python_3_centos_7.md
Last active March 12, 2017 01:57
Installing Python 3 with virtualenv on CentOS 7

Installing Python 3 with virtualenv on CentOS 7

## Enable the EPEL repository with: yum install epel-release

## Install python34 and python-pip packages with: yum install python34 python34-devel python-pip

## Update pip and install virtualenv with: pip install -U pip

@victorono
victorono / no-data-to-display.js
Last active March 12, 2017 01:22
Plugin for displaying a message when there is no data visible in chart.
/*
Highcharts JS v5.0.9 (2017-03-08)
Plugin for displaying a message when there is no data visible in chart.
Update to chart pie when data is null
(c) 2010-2016 Highsoft AS
Author: Oystein Moseng
License: www.highcharts.com/license
*/
@victorono
victorono / gist:bb2b03a1016a2c89b5ae78d349f877bf
Created February 9, 2017 01:05
Mac OS X: ValueError: unknown locale: UTF-8 in Python
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8