This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Instructions | |
# Before running this: | |
# - Delete your ~/.local/share/Steam/steamapps/compatdata/$GAME_ID folder. | |
# - Then set your proton version to 5.0-10 for the game. | |
# - Run the game and close after it starts. | |
# - After that, you're good to go. | |
# If the game is Rockman X Legacy Collection 1, the ID should be 743890 | |
# If the game is Rockman X Legacy Collection 2, the ID should be 743900 | |
# Thanks to https://github.com/PedroHLC for Debbuging this thing and finding out how to solve. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
BasedOnStyle: Mozilla | |
AccessModifierOffset: '-4' | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: 'true' | |
AlignConsecutiveDeclarations: 'true' | |
AlignEscapedNewlinesLeft: 'false' | |
AlignOperands: 'true' | |
AlignTrailingComments: 'true' | |
AllowAllParametersOfDeclarationOnNextLine: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
BasedOnStyle: Mozilla | |
AccessModifierOffset: '-4' | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: 'true' | |
AlignConsecutiveDeclarations: 'true' | |
AlignEscapedNewlinesLeft: 'false' | |
AlignOperands: 'true' | |
AlignTrailingComments: 'true' | |
AllowAllParametersOfDeclarationOnNextLine: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # Exit on error | |
DEVICE=$1 | |
[ -z "${DEVICE}" ] && echo "Usage $0 /dev/sdX" && exit 1 | |
udevadm info -n ${DEVICE} -q property | |
echo "Selected device is ${DEVICE}" | |
read -p "[Press enter to continue or CTRL+C to stop]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# | |
# sessionclean - a script to cleanup stale PHP sessions | |
# | |
# Copyright 2013-2015 Ondřej Surý <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Plack::Builder; | |
use Plack::App::File; | |
use CGI::Emulate::PSGI; | |
use CGI::Compile; | |
my $path_of_otrs = "/path/otrs"; | |
my $cgi_script_index = $path_of_otrs . "/bin/cgi-bin/index.pl"; | |
my $sub_index = CGI::Compile->compile($cgi_script_index); | |
my $app_index = CGI::Emulate::PSGI->handler($sub_index); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_tls_version($sslversion = null) | |
{ | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check"); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, true); | |
if ($sslversion !== null) { | |
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const | |
ForecastUrlFormat = "http://api.openweathermap.org/data/2.5/forecast/daily?APPID=$1&lang=en&q=$2&cnt=$3" | |
ResultFormat = """$1: | |
$2 | |
Temperature: $3 °C | |
Humidity: $4% | |
Clouds: $5% | |
Wind speed: $6 m/s""".unindent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\b((?=[a-z0-9-]{1,63}\.)(xn(-{0,4}))?[a-z0-9]+(-[a-z0-9]+)*\.)+((xn(-{0,4}))?[a-z0-9]+) | |
Testcases: | |
xn--dmin-moa0i.example | |
xn--aaa-pla.example | |
xn--aaa-qla.example | |
xn--aaa-rla.example | |
xn--aaa-sla.example | |
xn--dj-kia8a.vu.example | |
xn--efran-2sa.example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# description: Apache Tomcat init script | |
# processname: tomcat | |
# chkconfig: 234 20 80 | |
# | |
# Copyright (C) 2016 Holger Schramm | |
# Copyright (C) 2014 Miglen Evlogiev | |
# | |
# This program is free software: you can redistribute it and/or modify it under |
NewerOlder