Skip to content

Instantly share code, notes, and snippets.

Mohan Raj Rajamanickam mohanraj-r

Block or report user

Report or block mohanraj-r

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View config.test.js
// [Config options are not reflected in results · Issue #1183 · dequelabs/axe-core](https://github.com/dequelabs/axe-core/issues/1183)
const AxeBuilder = require("axe-webdriverjs")
const webDriver = require("selenium-webdriver")
// Config options for axe
// Ref: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter
const axeConfig = {
runOnly: {
type: "tag",
values: ["wcag2aa"]
@mohanraj-r
mohanraj-r / 0.0.Learn.md
Last active Sep 5, 2017
[Learn] #reference
View 0.0.Learn.md
@mohanraj-r
mohanraj-r / centos.sh
Last active Sep 5, 2017
[centos] Utils for working with centos #shell #reference
View centos.sh
# list files from a rpm file on disk without extracting it
# source: http://stackoverflow.com/a/18787544
rpmx(){
rpm_file=$1
rpm2cpio $rpm_file | cpio -idmv
}
# uninstalling package with issues
# http://serverfault.com/a/613258
yum clean all && rpm --rebuilddb
View max_weight_substring.go
// To execute Go code, please declare a func main() in a package "main"
// given an arbitrary input, find the substring that is closest to, but not greater than 1.00 where a=0.01 and z=0.26
// exit on finding 1.00
// if over or under keep scanning till end of string
// ascii only input - check and sanitize
// ignore uppercase - only process a-z
// g = 20
// i = 25
@mohanraj-r
mohanraj-r / scp-speed-test.sh
Last active Aug 26, 2019
[speed test] Test ssh connection speed
View scp-speed-test.sh
#!/bin/bash
# scp-speed-test.sh
# Author: Alec Jacobson alecjacobsonATgmailDOTcom
# http://www.alecjacobson.com/weblog/?p=635
#
# Test ssh connection speed by uploading and then downloading a 10000kB test
# file (optionally user-specified size)
#
# Usage:
# ./scp-speed-test.sh user@hostname [test file size in kBs]
@mohanraj-r
mohanraj-r / osx.sh
Last active Jan 26, 2019
[osx utils] osx related solutions #shell #reference #osx
View osx.sh
# add self-signed cert to keychain (used by Chrome etc)
# Get the self-signed cert file by clicking on the lock icon in chrome and dragging it to desktop
# http://www.robpeck.com/2010/10/google-chrome-mac-os-x-and-self-signed-ssl-certificates/
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <self-signed cert>
# ldd equivalent
# https://discussions.apple.com/thread/309193?start=0&tstart=0
otool -L <bin>
@mohanraj-r
mohanraj-r / git.sh
Last active Feb 27, 2019
[git] Git commands #shell #reference
View git.sh
# reset changes to a file
# http://stackoverflow.com/a/1817774
#
## Clone
## Clone only a single (feature) branch (from large repos)
git clone <repo> -b <branch> --single-branch --depth=1
# checkout a Pull request locally - https://help.github.com/articles/checking-out-pull-requests-locally/
# Fetch the reference to the pull request based on its ID number, creating a new branch
You can’t perform that action at this time.