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
git log --pretty=format:'%s' | tr '[:upper:]' '[:lower:]' | tr '[:space:]' '\n' | sort | uniq -c | sort -nr | grep -iE "(fuck|shit|bitch|damn|pis)" |
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 | |
//Define options | |
$options = new ArrayObject(array( | |
'a', | |
'b', | |
'c', | |
'd', | |
'e', | |
'f' |
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
^\s*($|#|\w+\s*=|(\*(?:\/\d+)?|(?:[0-5]?\d)(?:-(?:[0-5]?\d)(?:\/\d+)?)?(?:,(?:[0-5]?\d)(?:-(?:[0-5]?\d)(?:\/\d+)?)?)*)\s+(\*(?:\/\d+)?|(?:[01]?\d|2[0-3])(?:-(?:[01]?\d|2[0-3])(?:\/\d+)?)?(?:,(?:[01]?\d|2[0-3])(?:-(?:[01]?\d|2[0-3])(?:\/\d+)?)?)*)\s+(\*(?:\/\d+)?|(?:0?[1-9]|[12]\d|3[01])(?:-(?:0?[1-9]|[12]\d|3[01])(?:\/\d+)?)?(?:,(?:0?[1-9]|[12]\d|3[01])(?:-(?:0?[1-9]|[12]\d|3[01])(?:\/\d+)?)?)*)\s+(\*(?:\/\d+)?|(?:[1-9]|1[012])(?:-(?:[1-9]|1[012])(?:\/\d+)?)?(?:,(?:[1-9]|1[012])(?:-(?:[1-9]|1[012])(?:\/\d+)?)?)*|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\s+(\*(?:\/\d+)?|(?:[0-6])(?:-(?:[0-6])(?:\/\d+)?)?(?:,(?:[0-6])(?:-(?:[0-6])(?:\/\d+)?)?)*|mon|tue|wed|thu|fri|sat|sun)\s+|(@reboot|@yearly|@annually|@monthly|@weekly|@daily|@midnight|@hourly)\s+)([^\s]+)\s+(.*)$ |
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 | |
#On top of routes (got it in a service provider, but put it here because I have to debug) | |
App::bind('\Mewm\Shop\Storage\Category\CategoryRepository', function($app) { | |
return new \Mewm\Shop\Storage\Category\CategoryEloquent(); | |
}); | |
...... | |
#CategoryEloquent looks like this | |
namespace Mewm\Shop\Storage\Category; |
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
#!/usr/bin/env python | |
""" | |
Create, read, update, append and delete file test | |
""" | |
import sys, os | |
class FileOperation(): |
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
SELECT | |
m.id, | |
u.user_id | |
FROM | |
matches m | |
INNER JOIN ( | |
SELECT | |
match_id | |
FROM | |
match_user |
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
# | |
# This file MUST be edited with the 'visudo' command as root. | |
# | |
# Please consider adding local content in /etc/sudoers.d/ instead of | |
# directly modifying this file. | |
# | |
# See the man page for details on how to write a sudoers file. | |
# | |
Defaults env_reset | |
Defaults mail_badpass |
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
var page = 2; | |
var last_page = 100; | |
(function loop() { | |
if (page <= last_page) { | |
request("/data?page=" + page, function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
store_data(body) | |
} | |
page++; |
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
update table_with_posts p set col_to_update = ( | |
select | |
col_to_update_from | |
from | |
table_to_update_from | |
where | |
table_to_update_from.id in (<comma separated ids or select id statement) | |
order by rand() | |
limit 1 | |
) where id in (<ids to posts you wanna update>) |
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
var config, | |
url = require('url'), | |
path = require('path'); | |
function getDatabase() { | |
var db_config = {}; | |
if (process.env['DB_CLIENT']) { | |
db_config['client'] = process.env['DB_CLIENT']; | |
} else { | |
return { |
OlderNewer