Skip to content

Instantly share code, notes, and snippets.

@slayerfat
slayerfat / phpmd-ruleset.xml
Last active September 15, 2024 15:00
php mess detector ruleset for laravel and similar frameworks
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Laravel and similar phpmd ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Inspired by https://github.com/phpmd/phpmd/issues/137
using http://phpmd.org/documentation/creating-a-ruleset.html
</description>
@Repox
Repox / laravel
Created August 18, 2014 19:10
Laravel logrotate configuration (1 daily rotation, 7 days retention)
/home/laravel/app/storage/logs/laravel.log {
daily
missingok
rotate 7
maxage 7
compress
notifempty
create 755 user group
su user group
}
@KatieHoban
KatieHoban / gist:4648be8e5a87606a5b28
Last active August 29, 2015 14:03
Unfollower Detector
#While this particular version takes files of the text on my followers and following pages,
#it can be easily modified to check a past list of followers against a more recent list -
#just replace following.txt with the "past followers" file and followers.txt with "present followers".
#encoding may be 'utf-8' depending on the type of files you are using
with open('following.txt', 'r', encoding = 'latin-1') as following_file:
with open('followers.txt', 'r', encoding = 'latin-1') as followers_file:
discrepancy = set(following_file).difference(followers_file)
@magnetikonline
magnetikonline / README.md
Last active September 5, 2024 14:55
Setting Nginx FastCGI response buffer sizes.
@jvandyke
jvandyke / .gitconfig
Last active January 27, 2023 08:11
Use PHPStorm/WebStorm for git diff and merge tools
# ~/.gitconfig
# Add this to your global git configuration file
# Change phpstorm to webstorm, if you use that.
# Diff and merge tool changes
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...`
[merge]
tool = phpstorm
[diff]
tool = phpstorm
@axemclion
axemclion / screenscraper.user.js
Created July 26, 2009 16:56
Screen Scraper Template
// ==UserScript==
// @name ScreenScraperTemplate
// @namespace http://dy-verse.blogspot.com
// @include http://page.you.wanna.scrape/path?pageName?pageNumber=*
// ==/UserScript==
/**
* This function is responsible for submitting the data
* @param {Object} parsedData
* @param {Object} record