Skip to content

Instantly share code, notes, and snippets.

mikhailnov / dz1_v4.cpp
Last active May 21, 2019
C++ program to convert hexadecimal to decimal
View dz1_v4.cpp
// C++ program to convert hexadecimal to decimal
#include <iostream>
#include <string.h>
#include <cmath>
using namespace std;
// Function to validate input data
int validateInput(string hexVal)
int result = 0;
mikhailnov / system-auth(-winbind)
Last active May 10, 2019
View system-auth(-winbind)
auth required
auth sufficient nullok try_first_pass
auth requisite uid >= 500 quiet_success
auth sufficient krb5_auth use_first_pass
auth required
account required broken_shadow
account sufficient
account sufficient uid < 500 quiet
account [default=bad success=ok user_unknown=ignore] krb5_auth
mikhailnov / .htaccess
Created Dec 30, 2018 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /
mikhailnov / gist:c8de3e90e8a53f4c049e14cf3682235c
Created May 18, 2018
40-usb_modeswitch.rules with possible fix for ZTE AD 3700 19d2:fff2
View gist:c8de3e90e8a53f4c049e14cf3682235c
# Part of usb-modeswitch-data, version 20170806
# Works with usb_modeswitch versions >= 2.4.0. Slash before %k parameter
# is for compatibility only. Versions >= 2.5.0 don't need it.
ACTION!="add|change", GOTO="modeswitch_rules_end"
# Adds a symlink "gsmmodem[n]" to the lowest ttyUSB port with interrupt
# transfer; checked against a list of known modems, or else no action
KERNEL=="ttyUSB*", ATTRS{bNumConfigurations}=="*", PROGRAM="usb_modeswitch --symlink-name %p %s{idVendor} %s{idProduct} %E{PRODUCT}", SYMLINK+="%c"
You can’t perform that action at this time.