Skip to content

Instantly share code, notes, and snippets.

View alesya-h's full-sized avatar

Alesya Huzik alesya-h

View GitHub Profile
@alesya-h
alesya-h / git-imerge rebase through merges.md
Last active January 19, 2023 16:39
Turn a fork that has periodic merges of upstream into easily upstreamable rebaseable linear history

Turn a fork that has periodic merges of upstream into easily upstreamable rebaseable linear history (git-imerge rebase through merges)

find commits

git log origin/main..my_fork_with_periodic_merges

mark commits

(ns adventure-of-code.task1
(:require [clojure.string :as str]))
(defn new-direction [old-direction offset]
(-> old-direction
(+ offset)
(mod 4)))
(defn rotation-to-direction-offset [rotation-str]
(case rotation-str
@alesya-h
alesya-h / greasemonkey_yandex_music.js
Created October 2, 2016 15:03
Лайк трека в Яндекс.Музыке с клавиатуры
// ==UserScript==
// @name Яндекс.Музыка : лайк трека с клавиатуры
// @description Нажатие f на клавиатуре добавляет трек в понравившиеся
// @namespace http://aguzik.net
// @include http://music.yandex.*/*
// @include https://music.yandex.*/*
// @version 1
// @grant none
// ==/UserScript==
Развесить осенние листья
(2016, автор: Staenrey)
Первая строчка - аккорды
Вторая - мелодия
Третья - текст
Аккорды:
G = 2320
C(1) = 3000
a = routes1 do |x|
x.get 'bar'
x.post 'baz'
x.scope 'nested' do |y|
y.get 'quux'
y.scope 'more-nesting' do |z|
z.post 'boo'
end
end
x.scope 'another-scope' do |y|
@alesya-h
alesya-h / 1.c
Last active August 29, 2015 14:13
#include<stdio.h>
#include<windows.h>
DWORD summ(DWORD a)
{
__asm
{
push ebx
push edx
push esi
@alesya-h
alesya-h / exit_from_iframe.js
Last active August 29, 2015 14:10
exit from iframe
var getParameterByName = function(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
};
exit_url = getParameterByName('exit_url');
if(exit_url){
window.location = exit_url;
} else {

Keybase proof

I hereby claim:

  • I am alesguzik on github.
  • I am alesguzik (https://keybase.io/alesguzik) on keybase.
  • I have a public key whose fingerprint is E6A9 99E4 7182 9920 854D 1CE3 BCAE 164D DEF6 EE17

To claim this, I am signing this object:

@alesya-h
alesya-h / lvee2latex.rb
Created June 12, 2013 14:43
lvee abstract to latex
#!/usr/bin/env ruby
#
# Usage lvee2latex.rb id > out.tex
require "rubygems"
require "open-uri"
require "json"
require "redcloth"
if ARGV[0] == nil
# cookbooks/nginx/recipes/pacemaker.rb
include_recipe 'nginx'
service 'nginx' do
action 'disable'
end
pacemaker "nginx" do
Chef::Log.info c = <<"END"