Skip to content

Instantly share code, notes, and snippets.

View mvcaaa's full-sized avatar
🏠
Working from home

Andrey Astashov mvcaaa

🏠
Working from home
View GitHub Profile
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?><EntitiesDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="Haka-20211101125052" Name="urn:mace:funet.fi:haka" validUntil="2021-11-29T10:50:52Z" xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:metadata saml-schema-metadata-2.0.xsd urn:mace:shibboleth:metadata:1.0 shibboleth-metadata-1.0.xsd http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference URI="#Haka-20211101125052">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:

Steps taken on nexus2 system:

  1. Update OS release version Edit /etc/apt/sources.list.d/linux.dell.com.sources.list and /etc/apt/sources.list.d/openmanage.list - Put os version there
  2. Run apt-get install srvadmin-all srvadmin-all snmp snmpd snmp-mibs-downloader libsnmp-base ipmitool -y
  3. Open 1311 port to office network: ufw allow from 10.0.0.0/24 to any port 1311 ufw allow from 83.145.210.198 to any port 1311
  4. Start all the services srvadmin-services.sh start
  5. make sure web interface service up and running
@mvcaaa
mvcaaa / php.ini
Last active February 6, 2018 10:27
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
  • Update apparmor rules
curl -L https://gist.github.com/raw/67672ea297213b830e876c5489c06b99 > /etc/apparmor.d/abstractions/php7
curl -L https://gist.github.com/raw/89af8525ebfbe2ad36d755d5a8b21bdd > /etc/apparmor.d/usr.sbin.php-fpm7.0
curl -L https://gist.github.com/raw/d97677cb51b7b23641e6ed9f8bcfd674 > /etc/apparmor.d/usr.sbin.nginx
service apparmor reload
  • Install php7
<!--
/**
* Created by Astashov Andrey <[email protected]>
* Date: 20.01.2017 / 01:00
*/
-->
<script>
var objs = {
"1":{
"count":10,
<?php
/**
* FIXME: This is first working version of the script.
* I do not like it - not optimal and broke DRY, needs to be refactored
*
* Usage example:
*
* $strFolderName = $argv[1] ? $argv[1] : '.';
* var_dump(mainFunc($strFolderName, FORMAT_ARRAY));
<?php
/**
* FIXME: This is first working version of the script.
* I do not like it - not optimal and broke DRY, needs to be refactored
*
* Usage example:
*
* $strFolderName = $argv[1] ? $argv[1] : '.';
* var_dump(mainFunc($strFolderName, FORMAT_ARRAY));
<?PHP
$de_cp1251 = array(
0x0080 => 0x0402, # CYRILLIC CAPITAL LETTER DJE
0x0081 => 0x0403, # CYRILLIC CAPITAL LETTER GJE
0x0082 => 0x201a, # SINGLE LOW-9 QUOTATION MARK
0x0083 => 0x0453, # CYRILLIC SMALL LETTER GJE
0x0084 => 0x201e, # DOUBLE LOW-9 QUOTATION MARK
0x0085 => 0x2026, # HORIZONTAL ELLIPSIS
0x0086 => 0x2020, # DAGGER
0x0087 => 0x2021, # DOUBLE DAGGER
@mvcaaa
mvcaaa / Test.js
Created September 30, 2015 11:01
angular.module("App").run(["$templateCache", function($templateCache) {$templateCache.put("app/components/country/country.view.tpl.html"," <div class=\"container\">\n\n <form action=\"{{formTarget}}\" method=\"post\" role=\"geoform\" id=\"geoform\" style=\"margin-right:30px\">\n\n <div class=\"form-group\">\n <label for=\"country\">Country:</label>\n <select id=\"country\" name=\"country\" ng-model=\"country\" class=\"form-control\">\n <option value=\"\">Select Country</option>\n <option ng:repeat=\"country in countries\" value=\"{{country.code}}\">{{country.name}}</option>\n </select>\n </div>\n\n <div class=\"form-group\" ng-show=\"country != \'\'\">\n <label for=\"zipcode\">Zipcode:</label>\n <input ng-model=\"zipcode\" id=\"zipcode\" name=\"zipcode\" type=\"text\" placeholder=\"Zipcode\" class=\"form-control\"/>\n </div>\n\n <div class=\"form-group\" ng-show=\"country == \'NL\'\">\n <label for=\"houseNumber\">House Number:</label>\n <input ng-model=\"houseNumber\" i
<?PHP
$interestingCrawlers = array( 'yandex', 'google', 'yahoo' );
$pattern = '/(' . implode('|', $interestingCrawlers) .')/';
$matches = array();
if(!isset($_SESSION)){
if (rand(0,10) > 5) {
session_start();
} else {