Skip to content

Instantly share code, notes, and snippets.

View vignesh0025-zz's full-sized avatar
🎯
Focusing

Vignesh D vignesh0025-zz

🎯
Focusing
  • Student at NIT Puducherry
  • India
View GitHub Profile
@vignesh0025-zz
vignesh0025-zz / regexCheatsheet.js
Created January 15, 2019 10:43 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@vignesh0025-zz
vignesh0025-zz / Download.bat
Created December 8, 2018 14:49
Windows batch script to download a file even after network failure
REM You need to install wget (Use choco to do it easily)
@echo off
setlocal EnableExtensions
:download
wget -c -t inf --waitretry=3 --timeout=10 --retry-connrefused <url>
echo ERROR is %errorlevel%
@vignesh0025-zz
vignesh0025-zz / Commands.sh
Created December 11, 2017 19:21
OpenSuse BCM4352 Driver
Run:
uname -r
Note this:
*default*/*desktop*/*pae*
Add repo:
zypper ar -f -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/pacman.repo
for default:
#Download and extract boost
http://www.boost.org/users/history/version_1_58_0.html
#Create a build directory
mkdir build
#Run this command
#Check the python version available
#Programs and features
This file describes the programs installed in the system for future installations.
[TOC]
@vignesh0025-zz
vignesh0025-zz / my.cnf
Created July 8, 2017 14:28
MariaDB my.cnf
#
# FromDual configuration file template for MySQL, Galera Cluster, MariaDB and Percona Server
# Location: /etc/my.cnf or /etc/mysql/my.cnf
# This template is intended to work with MySQL 5.6 and newer and MariaDB 10.0 and newer
# Get most recent updated from here:
# http://www.fromdual.com/mysql-configuration-file-sample
#
[client]
sudo apt-get update
sudo apt-get install bcmwl-kernel-source
sudo modprobe wl
Opensuse:
Add repo:
zypper ar -f -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.2/ packman
{
"name": "laravel/homestead",
"description": "This box contains Ubuntu 12.04 LTS 64-bit Laravel by Vignesh.",
"versions": [
{
"version": "0.5.0",
"providers": [
{
"name": "virtualbox",
"url": "LaravelVig.box"
#!sh
set -e
git clone --depth=1 https://github.com/vim/vim
cd vim
sudo apt-get install libx11-dev libxtst-dev libxt-dev libsm-dev libxpm-dev
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config \
@vignesh0025-zz
vignesh0025-zz / feedback_dd
Created December 25, 2015 13:14
display dd command feedback
To see the progress of dd once it's running, open another terminal and enter:
sudo kill -USR1 $(pgrep ^dd)
Regular:
watch -n5 'sudo kill -USR1 $(pgrep ^dd)'
watch will probe the dd process every -n seconds (-n5 = 5 seconds) and report without halting it.