Skip to content

Instantly share code, notes, and snippets.

View arduanov's full-sized avatar
🍄
work is fun

Marsel Arduanov arduanov

🍄
work is fun
  • Perm, Russia
View GitHub Profile
#!/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
<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&amp;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>
\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;
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)
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();
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,
<?php
/**
* SAPE.ru - Интеллектуальная система купли-продажи ссылок
*
* PHP-клиент
*
* Вебмастеры! Не нужно ничего менять в этом файле!
* Все настройки - через параметры при вызове кода.
*
* Подробную информацию по добавлению сайта в систему,
@arduanov
arduanov / php-fpm-cli
Created September 25, 2015 19:47 — forked from muhqu/php-fpm-cli
#!/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
<?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;
# 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 ->