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 / google_rating_filter_sitejabber.js
Last active June 16, 2022 06:08
Can be used with Run Javascript – Chrome Extension. Hides and make opaque low rating sites on Google according to SiteJabber rating.
setTimeout(() => {
var ratings = document.querySelectorAll(".sj_info"); var blocks = document.querySelectorAll("[sj_processed='true']");
for (let index = 0; index < ratings.length; index++) {
var rating = ratings[index];
var block = blocks[index];
var number = Number(rating.textContent.split(" ")[0]);
var opacity = Math.max(Math.min((Math.pow(number,1.2)-0.05)/5 + 0.05, 1), 0);
rating.style.opacity = block.style.opacity = opacity;
if(opacity < 0.1) {
@Ivajkin
Ivajkin / things3-to-of3.applescript
Created October 18, 2019 11:12 — forked from matellis/things3-to-of3.applescript
Script to import from Things 3 into Omnifocus 3
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2 && https://gist.github.com/cdzombak/11265615
-- Added: OF3 & Things 3 compatibility; task order; areas/folders; tags
-- Empty your Things Trash first.
--
@Ivajkin
Ivajkin / things-3-to-omnifocus-3.applescript
Last active July 21, 2024 00:39 — forked from cdzombak/things-to-of.applescript
Export tasks from Things 3 to Omnifocus 3
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2
-- Added: creation date, due date, start date functionality
-- Empty your Things Trash first.
-- Note that this won't move over scheduled recurring tasks.
@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');
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
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
@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);
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 / 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>
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception {
auth
.inMemoryAuthentication()
.withUser("user").password("password").roles("USER");