Skip to content

Instantly share code, notes, and snippets.

Oleg Lavrovsky loleg

Block or report user

Report or block loleg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@loleg
loleg / newscoop_animated_images.js
Last active Aug 29, 2015
Script to replace cropped animations with originals in Newscoop
View newscoop_animated_images.js
// Encapsulate script code
(function($) {
// Select all images in 'ad' articles
$("a.section-ad.layoutbgimage, article.ad img.image-link").each(function() {
asBgImage = typeof $(this).attr('src') === "undefined";
// Obtain current url(..) path to the image
u = asBgImage ? this.style.backgroundImage : this.src;
// Apply additional criteria to ensure target crop format
if (u.indexOf('/cache/')<0 || u.indexOf('.gif')<0) return;
@loleg
loleg / gist:1281213
Created Oct 12, 2011
Arch Linux patch for build-couchdb
View gist:1281213
lib.rb:122:
when :archlinux
installed = `pacman -Q`.split("\n")
if !installed.member?(package)
sh "sudo pacman -S #{package}"
end
distros.rb:74:
@loleg
loleg / gist:2909117
Created Jun 11, 2012
Error opening Symphony CMS 2.3 homepage after upgrade
View gist:2909117
Symphony Fatal Error: Could not find Event login. If it was provided by an Extension, ensure that it is installed, and enabled.
An error occurred in /home/httpd/vhosts/optident.ch/httpdocs/symphony/lib/toolkit/class.eventmanager.php around line 175
170 public static function create($handle, array $env = null){
171 $classname = self::__getClassName($handle);
172 $path = self::__getDriverPath($handle);
173
174 if(!is_file($path)){
175 throw new Exception(
@loleg
loleg / _.md
Created Jul 25, 2016
GISTEMP Animated Temperature Visualization
View _.md
View gist:7458a26da3bfcd803b5ed9f7b16d5231
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
View keybase.md

Keybase proof

I hereby claim:

  • I am loleg on github.
  • I am loleg (https://keybase.io/loleg) on keybase.
  • I have a public key whose fingerprint is 4510 45E3 0B29 B969 7E95 BB6A EA91 3D83 7287 B56A

To claim this, I am signing this object:

@loleg
loleg / count_self_references.sh
Last active Feb 17, 2017
Count lines and references in a bunch of projects' docs
View count_self_references.sh
for dir in `ls -d */`;
do
cd $dir/docs
echo Total lines in ${dir%%/}:
find . -type f -exec cat {} + | wc -l
echo References of ${dir%%/}:
grep -ori ${dir%%/} * | wc -l
cd .. && cd ..
done
@loleg
loleg / git-bokeh-demo.ipynb
Last active Aug 9, 2017
Exploring Git data with Python, Pandas, Numpy and Bokeh
View git-bokeh-demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@loleg
loleg / dribdat-hacknight-challenge.md
Last active Oct 18, 2017
A sample challenge in Markdown for the DINAcon HACKnight
View dribdat-hacknight-challenge.md

Dribdat is an open platform for data-driven team collaboration, such as Hackathons. It works as a website and project board for running exciting, productive events..with Impact Factor. The platform allows organisers and participants to aggregate project details from multiple sources (Markdown, Wikis, GitHub, Bitbucket), display challenges and projects, reuse the data, plug in community tools like Discourse, Slack, Let's Chat, and chatbots to enhance the hackathon.


{ hacknight challenges }

Yes, Dribdat is the website you see running here. Just [create an account](/register) to login, and add a project you are working on - or join an existing one as team member. Find out how projects are sync'ed and scored for bonus points.

Read the Documentati

View generate-datapackage.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.