Skip to content

Instantly share code, notes, and snippets.

$("a:contains('Рекламная запись')").closest(".feed_row").remove()
$("a:contains('Реклама')").closest(".feed_row").remove()
@MighteeCactus
MighteeCactus / tumblr_regex_link_restore.rx
Last active February 27, 2018 18:40
Restore tumblified links to normal state.
@MighteeCactus
MighteeCactus / tmblr_regex_link.rgx
Created January 25, 2018 14:03
Tumblr link tracks
@MighteeCactus
MighteeCactus / SayMeRandNum.js
Last active August 27, 2017 13:00
Quick hack for google translate service to train listening of numbers in foreign language
function sayMeRandNum(min, max)
{
var num = min + (Math.floor(Math.random()*100000000000000) % (max - min));
$("#source").value = num
function triggerMouseEvent (node, eventType) {
var clickEvent = document.createEvent('MouseEvents');
clickEvent.initEvent (eventType, true, true);
node.dispatchEvent (clickEvent);
@MighteeCactus
MighteeCactus / strip_packing_tag.sh
Last active August 3, 2017 11:57
Unity. Strip all packing tags in the folder. Script accepts one argument which is the folder in which to search for meta files.
#!/bin/bash
# script accepts one argument which is the folder in which to search for meta files.
# on MacOS sed -i is required to have extension of the backup file, script will remove
# backups in the end.
cd "$@"
for name in `find . -name "*.meta"`;
do
@MighteeCactus
MighteeCactus / gist:f4421c96224f6afc9183f2fffce02600
Created April 24, 2017 09:02
2017-04-24_unity_editor_crash.log
Process: Unity [16303]
Path: /Applications/Unity/Unity.app/Contents/MacOS/Unity
Identifier: com.unity3d.UnityEditor5.x
Version: Unity version 5.5.1f1 (5.5.1f1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Unity [16303]
User ID: 501
Date/Time: 2017-04-24 11:46:35.985 +0300
@MighteeCactus
MighteeCactus / kill_bill.cpp
Created April 22, 2017 20:26
kill bill color scheme
// kill bill color scheme
//
// 28, 16, 14 - black (2%)
// 159, 18, 15 - red (25%)
// 172, 125, 59 - dark brown (42%)
// 226, 193, 80 - light brown (23%)
// 247, 218, 0 - yellow (8%)
@MighteeCactus
MighteeCactus / text_race.py
Last active April 16, 2017 21:39
Simple race game using Omega2 + LCD display + 2 buttons
#
# -= TEXT RACE =-
#
# Rules are simple: you are racing through 16x2 LCD display
# and trying to reach the right border of it. That is all!
#
# Project is made for Omega2 platform.
#
# Made by Bykov Alexander <mightee.cactus@gmail.com>.
#
@MighteeCactus
MighteeCactus / freqc.cpp
Created March 1, 2017 17:51
Unigine's C++ School entry test
// Быков Александр.
// В общей сложности ушло часов 5. Где-то 80% времени ушло на то,
// чтобы нагуглить и вспомнить как пользоваться классами STL :)
#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <sstream> // для разбивки строки на слова
#include <regex> // regex и regex_replace
if (Mакс > Олег) // у макса больше
{
if (Макс > Аня) // у макса все еще больше
{
return Макс
}
else
{
return Аня
}