Skip to content

Instantly share code, notes, and snippets.

@bedefaced
bedefaced / vk-image-subst.md
Last active June 11, 2024 16:18
Подмена картинок в посте ВКонтакте

По мотивам https://vk.com/id232967147 / https://vk.com/mgnoveniag

  1. Создаём пост с любой картинкой.
  2. Ждём полгода/год. Открываем газету, выбираем важные события современности.
  3. Редактируем у себя на комплюктере исходную картинку, описывая важные события современности.
  4. Открываем ту старую фотографию из поста ВКонтакте, нажимаем "Редактировать".
  5. Открываем инструменты разработчика в своём браузере и узнаём значение переменной cur.filterSaveOptions.upload_url.
  6. Пишем программу на HTML. Создаём файлик upload.html:
@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

anonymous
anonymous / gist:1591233
Created January 10, 2012 21:12
Comments to some WPF sourcces
Код UIElement:
/// <summary>
/// Updates DesiredSize of the UIElement. Must be called by parents from theor MeasureCore, to form recursive update.
/// This is first pass of layout update.
/// </summary>
/// <remarks>
/// Measure is called by parents on their children. Internally, Measure calls MeasureCore override on the same object,
/// giving it opportunity to compute its DesiredSize.<para/>
@fcalderan
fcalderan / inception-javascript.js
Created November 2, 2010 09:42
inception explained as a 4 nested javascript closures
/*
* Fabrizio Calderan, twitter @fcalderan, 2010.11.02
* I had an idea: could Inception movie be explained by a few javascript closures
* and variable resolution scope (just for fun)?
*
* Activate javascript console =)
*/
<script>
console.group("inception movie");