This file contains hidden or 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 | |
# CVE-2016-1531 exim <= 4.84-3 local root exploit | |
# =============================================== | |
# you can write files as root or force a perl module to | |
# load by manipulating the perl environment and running | |
# exim with the "perl_startup" arguement -ps. | |
# | |
# e.g. | |
# [fantastic@localhost tmp]$ ./cve-2016-1531.sh | |
# [ CVE-2016-1531 local root exploit |
This file contains hidden or 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
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="initial-scale=1"> | |
<title>https://www.google.ru/search?hl=en-RU&q=Melissa%20Isom%20Quebec%20Government%20Office</title> | |
</head> | |
<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px;" onload="e=document.getElementById('captcha');if(e){e.focus();}"> | |
<div style="max-width:400px;"> | |
<hr noshade size="1" style="color:#ccc; background-color:#ccc;"> | |
<br> | |
This file contains hidden or 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
\copy raw_games(id,id_source,name_source,name,date_create,status,img,website,email,about,json_info) FROM '/var/www/palantir/current/var/a.csv' DELIMITER ',' CSV; |
This file contains hidden or 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
In Capistrano 2 I had something like this in my Capfile: | |
set :stage_dir, 'deployment/deploy' | |
require "./deployment/railsless-deploy.rb" | |
load 'deployment/deploy' if respond_to?(:namespace) |
This file contains hidden or 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
up vote | |
62 | |
down vote | |
Create a function that updates the changetimestamp column of a table like so: | |
CREATE OR REPLACE FUNCTION update_changetimestamp_column() | |
RETURNS TRIGGER AS $$ | |
BEGIN | |
NEW.changetimestamp = now(); |
This file contains hidden or 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: In PostgreSQL 9.4 this improves a lot with the introduction of to_json, json_build_object, json_object and json_build_array, though it's verbose due to the need to name all the fields explicitly: | |
select | |
json_build_object( | |
'id', u.id, | |
'name', u.name, | |
'email', u.email, | |
'user_role_id', u.user_role_id, | |
'user_role', json_build_object( | |
'id', ur.id, |
This file contains hidden or 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 | |
/** | |
* SAPE.ru - Интеллектуальная система купли-продажи ссылок | |
* | |
* PHP-клиент | |
* | |
* Вебмастеры! Не нужно ничего менять в этом файле! | |
* Все настройки - через параметры при вызове кода. | |
* | |
* Подробную информацию по добавлению сайта в систему, |
This file contains hidden or 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 | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Mathias Leppich <[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 |
This file contains hidden or 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 | |
namespace Codeception\Module; | |
use Codeception\Configuration; | |
use Codeception\Exception\ModuleConfigException; | |
use Codeception\Lib\Framework; | |
use Codeception\TestCase; | |
use Symfony\Component\HttpKernel\Client; | |
use Codeception\Lib\Interfaces\DoctrineProvider; |
This file contains hidden or 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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |