Skip to content

Instantly share code, notes, and snippets.

View Ivajkin's full-sized avatar
🎯
Focusing

Timothy S. Ivaykin Ivajkin

🎯
Focusing
View GitHub Profile
@Ivajkin
Ivajkin / autho.php
Created August 19, 2012 05:36
Авторизация
<?php
if(isset($_POST['login'])){
$pass = $_POST["pass"];
$login = $_POST["login"];
//$pass = 'pass';
//$login = 'login';
$cpass = crypt($pass, "$2a$07$SomeSaltWordsMakeItHarder$");
$passFile = file_get_contents("passFile.php");

Уже устарело, все переведено в Issue

09.11.2012

#ОСТАЛОСЬ:

Мобильная версия

Загрузка резюме

Preface
The artist is the creator of beautiful things. To reveal art and conceal the artist is art's aim. The critic is he who can translate into another manner or a new material his impression of beautiful things.
The highest as the lowest form of criticism is a mode of autobiography. Those who find ugly meanings in beautiful things are corrupt without being charming. This is a fault.
Those who find beautiful meanings in beautiful things are the cultivated. For these there is hope. They are the elect to whom beautiful things mean only beauty.
There is no such thing as a moral or an immoral book. Books are well written, or badly written. That is all.
The nineteenth century dislike of realism is the rage of Caliban seeing his own face in a glass.
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception {
auth
.inMemoryAuthentication()
.withUser("user").password("password").roles("USER");
@Ivajkin
Ivajkin / love.xml
Last active September 6, 2016 06:32
<?xml version="1.0" encoding="utf-8"?>
<I>
<dream>
<my-dream of="you and I"/>
<do>
<you my="love"/>
<give-me your="smile"/>
<am i="awake"/>
<or/>
</do>
protected ClientAddress[] LoadClientAddresses()
{
// SessionData.System может быть не заданым?
if (SessionData.System.Client == null) return new ClientAddress[0];
List<ClientAddress> clientAddressList = new List<ClientAddress>();
// _readOnlyDeliveryService, SessionData.System.Client или SessionData.System.Locality
ClientAddress[] clientAddresses = _readOnlyDeliveryService.GetClientAddressesByDeliveryLocality(SessionData.System.Client.PhoneNumber, SessionData.System.Locality.Id);
@Ivajkin
Ivajkin / tscontract.ts
Created August 1, 2019 07:27 — forked from SoEasy/tscontract.ts
TypeScript contract-based decorators
type MethodDecorator = (target: any, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) =>
TypedPropertyDescriptor | void;
type AssertFn = (...args: Array<any>) => void;
class TSContract {
private static isCustomContractInterruptionCb: boolean = false;
private static contractInterruptionCb(message: string): void {
console.warn(message);
Declare cTables Cursor LOCAL FORWARD_ONLY FAST_FORWARD READ_ONLY For
SELECT Distinct
OBJECT_SCHEMA_NAME(fk.parent_object_id) AS Table1_Scheme_Name,
OBJECT_NAME(fk.parent_object_id) AS Table1_Name,
OBJECT_SCHEMA_NAME(fk.referenced_object_id) AS Table2_Scheme_Name,
OBJECT_NAME (fk.referenced_object_id) AS Table2_Name
FROM sys.foreign_keys fk
INNER JOIN sys.foreign_key_columns AS fc ON fk.[OBJECT_ID] = fc.constraint_object_id
where fk.parent_object_id <> fk.referenced_object_id AND
OBJECT_SCHEMA_NAME(fk.parent_object_id) NOT IN ('sys', 'pm', 'alog', 'mnt') and
SELECT DISTINCT
o1.type AS object1_type,
OBJECT_SCHEMA_NAME(d.referencing_id) AS [object1_scheme_name],
OBJECT_NAME(d.referencing_id) AS [object1_name],
o2.type AS object2_type,
OBJECT_SCHEMA_NAME(d.referenced_id) AS [object2_scheme_name],
OBJECT_NAME(d.referenced_id) AS [object2_name]
FROM sys.sql_expression_dependencies d
INNER JOIN sys.objects o1 ON o1.[object_id] = d.referencing_id
INNER JOIN sys.objects o2 ON o2.[object_id] = d.referenced_id
@Ivajkin
Ivajkin / filter-windows-themes.js
Created October 4, 2019 05:38
Filter Windows themes by rating
// Launch in console for https://www.microsoft.com/en-us/store/collections/windowsthemes
// Or create a pluging for Google Chrome
document.querySelectorAll('.m-channel-placement-item').forEach(node => node.style.display = /Rated (.\.?.?) out of 5 stars/.exec(node.innerText)[1] === '5' ? 'block' : 'none');