Skip to content

Instantly share code, notes, and snippets.

PHP Copy/Paste Detector - https://github.com/sebastianbergmann/phpcpd
PHP Mess Detector - https://github.com/phpmd/phpmd
PHP Coding Standards Fixer - https://github.com/FriendsOfPHP/PHP-CS-Fixer
PHP Codesniffer - https://github.com/squizlabs/PHP_CodeSniffer
https://github.com/hootsuite/pre-commit-php
@rud-felix
rud-felix / data.json
Created July 13, 2017 13:41
Validation Json Schema
{
/*
"payment": "paypal",
"paypalWallet": "Z1111111111"
*/
"payment": "wmz",
"wmzWallet": "[email protected]"
@rud-felix
rud-felix / NLog
Last active December 8, 2016 21:39
<nlog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="logfile" xsi:type="File" fileName="${basedir}/${date:format=yyyy-MM-dd}-webapi.log" />
<target name="eventlog" xsi:type="EventLog" layout="${message}" log="Application" source="My Web API Application" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="logfile" />
<logger name="*" minlevel="Trace" writeTo="eventlog" />
</rules>
</nlog>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="Test" type="System.Configuration.NameValueFileSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
#######
<Encryption>
// Arrange
var controller = new ConfigurationsController(null);
var controllerContext = new HttpControllerContext();
var request = new HttpRequestMessage();
request.Headers.Add("X-My-Header", "success");
// Don't forget these lines, if you do then the request will be null.
controllerContext.Request = request;
controller.ControllerContext = controllerContext;
string pass = "Your_password";
SHA1 sh5Hash = SHA1.Create();
// Calculate SHA1 hash from input
byte[] data = sha1Hash.ComputeHash(Encoding.UTF8.GetBytes(pass));
StringBuilder sBuilder = new StringBuilder();
// Convert byte array to hex string
for (int i = 0; i < data.Length; i++)
{
31a635b77191587fb4ca6843d89fa9bf322350de8a
body:after {
position: absolute;
width: 0;
height: 0;
overflow: hidden;
z-index: -1;
content:
url("")
}
https://buy.wosign.com/free/
@rud-felix
rud-felix / 01-README.md
Created July 26, 2016 13:56 — forked from petemcw/01-README.md
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup