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" |
View .htaccess
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
View system-auth(-winbind)
auth required pam_env.so | |
auth sufficient pam_unix.so nullok try_first_pass | |
auth requisite pam_succeed_if.so uid >= 500 quiet_success | |
auth sufficient pam_winbind.so krb5_auth use_first_pass | |
auth required pam_deny.so | |
account required pam_unix.so broken_shadow | |
account sufficient pam_localuser.so | |
account sufficient pam_succeed_if.so uid < 500 quiet | |
account [default=bad success=ok user_unknown=ignore] pam_winbind.so krb5_auth |
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; |
View dz2_v4.cpp
#include <iostream> | |
#include <string.h> | |
#include <cmath> | |
using namespace std; | |
/* эти переменные будем использовать в разных функциях, поэтому | |
* сделаем их глобальными, вынеся за пределы функции */ | |
string input_string; | |
string converted_string; | |
string converted_string_copy_demo; |
View tr1.sh
# https://video.stackexchange.com/a/26258 | |
# https://superuser.com/a/538038 | |
# https://trac.ffmpeg.org/wiki/SupportedMediaTypesInFormats | |
# itoffset works only for video! https://trac.ffmpeg.org/ticket/1349 | |
# To test: ffplay -listen 1 -i rtmp://0.0.0.0:8082/dumacast | |
ffmpeg \ | |
-listen 1 -itsoffset 00:00:05.060 -i rtmp://0.0.0.0:8082/dumacast \ | |
-f pulse -i default \ | |
-f flv -strict -1 -preset veryfast -c:v libx264 -c:a aac "${RTMP_VK_URL}/${RTMP_VK_KEY}" |
View build-rpm.sh
OUTPUT_FOLDER=$HOME/output | |
container_data() { | |
# Generate data for container | |
[ "$rerun_tests" = 'true' ] && return 0 | |
c_data=container_data.json | |
project_name=systemd | |
echo '[' > ${c_data} |
View gist:b5edfbca508548dd119affdee688cdac
231: | |
KillUserProcesses | |
When using systemd's default tmp.mount unit for /tmp, the mount point will now be established with the "nosuid" and "nodev" options. This avoids privilege escalation attacks that put traps and exploits into /tmp. | |
* A new rpm macro %systemd_ordering is provided by the macros.systemd file. It can be used in lieu of %systemd_requires in packages which don't use any systemd functionality and are intended to be installed in minimal containers without systemd present. This macro provides ordering dependencies to ensure that if the package is installed in the same rpm transaction as systemd, systemd will be installed before the scriptlets for the package are executed, allowing unit presets to be handled. New macros %_systemdgeneratordir and %_systemdusergeneratordir have been added to simplify packaging of generators. | |
* The os-release file gained VERSION_CODENAME field for the distribution nickname (e.g. VERSION_CODENAME=woody). |
View merge.sh
#!/bin/bash | |
set -xefu | |
# New packages | |
for i in \ | |
createrepo_c \ | |
dnf \ | |
dnf-plugins-core \ | |
dnf-plugins-extras \ |
View kinstall.sh
#!/bin/sh | |
set -efu | |
export DEBIAN_FRONTEND=noninteractive | |
FALLBACK=0 | |
APT_MAIN=0 | |
DONE=0 | |
khpkg="" | |
kernel="$(uname -r || :)" | |
if [ -z "$kernel" ]; then | |
echo "Unable to get kernel version, trying fallback" |
OlderNewer