Skip to content

Instantly share code, notes, and snippets.

View dandv's full-sized avatar
🔍
Weaviate

Dan Dascalescu dandv

🔍
Weaviate
View GitHub Profile
@dandv
dandv / Reveal.js bug 202
Created October 25, 2012 01:55
Slides don't load on Android 2.3 if the highlight plugin isn't loaded
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>5reveal.js - The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
discourse@localhost-app:/var/www/discourse/script/import_scripts$ RAILS_ENV=production ruby mybbtopics.rb
loading existing groups...
loading existing users...
loading existing categories...
loading existing posts...
loading existing topics...
creating topics and posts
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.7/lib/patches/db/mysql2.rb:6: [BUG] Segmentation fault
ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux]
@dandv
dandv / mybb.rb-core-dump.txt
Last active October 15, 2015 00:26
Discourse MyBB importer mysql2 gem v0.3.20 crashes
discourse@localhost-app:/var/www/discourse/script/import_scripts$ RAILS_ENV=production ruby mybb.rb.1
loading existing groups...
loading existing users...
loading existing categories...
loading existing posts...
loading existing topics...
creating users
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.7/lib/patches/db/mysql2.rb:6: [BUG] Segmentation fault
ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux]
@dandv
dandv / mybb2discourse-topic-ids.map
Created October 16, 2015 01:13
Nginx map of MyBB topic ids to Discourse topic IDs for the Quantified Self Forum
/thread-quantified-self-forum-launched /t/quantified-self-forum-launched/51 ;
/thread-best-intro-to-quantified-self-articles /t/best-intro-to-quantified-self-articles/52 ;
/thread-reaction-time-app-for-android /t/reaction-time-app-for-android/53 ;
/thread-qs-forum-ideas-for-starting-off-on-the-right-foot /t/qs-forum-ideas-for-starting-off-on-the-right-foot/54 ;
/thread-using-and-enjoying /t/using-and-enjoying/55 ;
/thread-split-todo-reorganize-the-qs-subforums /t/split-todo-reorganize-the-qs-subforums/59 ;
/thread-todo-make-the-custom-profile-fields-display-on-the-registration-page /t/todo-make-the-custom-profile-fields-display-on-the-registration-page/64 ;
/thread-how-will-you-use-the-green-goose-stickers /t/how-will-you-use-the-green-goose-stickers/65 ;
/thread-data-analysis-software /t/data-analysis-software/66 ;
/thread-registration-agreement-notice-about-health-advice /t/registration-agreement-notice-about-health-advice/67 ;
@dandv
dandv / gist:5563145
Created May 12, 2013 10:52
Why is it so cumbersome to do really simple things in node, like reading records from a file one by one? In Perl, C, PHP, Java, whatever, you'd just run: while ( record = file.fetch() ) { /* do stuff with record */ }
/*jslint node: true*/
'use strict';
var fs = require('fs');
var csv = require('csv');
var async = require('async');
// note, io.listen(<port>) will create a http server for you
//var io = require('socket.io').listen(8901);
//io.sockets.on('connection', function (socket) {
@dandv
dandv / error pip installing ansible
Created January 23, 2015 01:11
sudo pip install ansible
vagrant@precise64:~$ sudo pip install ansible
Requirement already satisfied (use --upgrade to upgrade): ansible in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/local/lib/python2.7/dist-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): distribute in /usr/lib/python2.7/dist-packages (from ansible)
Downloading/unpacking pycrypto>=2.6 (from ansible)
Downloading pycrypto-2.6.1.tar.gz (446Kb): 446Kb downloaded
Running setup.py egg_info for package pycrypto
@dandv
dandv / imagecapture.js
Created July 10, 2017 23:10
Babel output for imagecapture.js
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['exports'], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
@dandv
dandv / Keybase proof
Created August 22, 2018 03:53
'cuz someone took dandv
### Keybase proof
I hereby claim:
* I am dandv on github.
* I am dandvd (https://keybase.io/dandvd) on keybase.
* I have a public key ASBlikcLl2oBaENzk_laoLz8xlmgKcKBOUTqpLS80q3UWwo
To claim this, I am signing this object:
@dandv
dandv / npm logs
Created November 10, 2018 19:36
Squoosh npm start fails on Chrome 70
dandvexternal@penguin:~$ git clone https://github.com/GoogleChromeLabs/squoosh.git
Cloning into 'squoosh'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 3042 (delta 5), reused 7 (delta 2), pack-reused 3023
Receiving objects: 100% (3042/3042), 33.59 MiB | 5.04 MiB/s, done.
Resolving deltas: 100% (1798/1798), done.
dandvexternal@penguin:~$ cd squoosh/
dandvexternal@penguin:~/squoosh$ npm install; npm run build; npm run build; npm start
@dandv
dandv / dmesg.txt
Created December 9, 2018 07:51
Lenovo ThinkPad X1 Carbon 6th gen touchpad and trackpoint not working
dandv@X1C:~$ dmesg
[ 0.000000] Linux version 4.15.0-42-generic (buildd@lgw01-amd64-023) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 (Ubuntu 4.15.0-42.45-generic 4.15.18)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.15.0-42-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=1
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'