Skip to content

Instantly share code, notes, and snippets.


kik oelmekki

  • society
  • earth
View GitHub Profile
oelmekki /
Created Dec 30, 2015
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix:
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

View Using only libre sofware, free software, FOSS with Elegoo

Using only libre sofware / free software / FOSS with Elegoo Mars2

It took some time for me to find a way to use my mars2 printer without using any proprietary software, so I figured I would post about it for other people to whom it matters. The goal here is to replace Chitubox/Lychee used on my computer, I did not mess with the printer itself (meaning: this is not about flashing the printer's firmware with a libre alternative).

The slicer I use is prusa-slicer. As far as I know, it's the only libre slicer handling SLA. Funny enough from what I read, some people already use it for

oelmekki / 0001-FIX-makes-elinks-work-with-ruby-2.5.patch
Last active Jul 4, 2020
Patch to fix elinks ruby support with ruby-2.5
View 0001-FIX-makes-elinks-work-with-ruby-2.5.patch
View index.html
<!doctype html>
document.addEventListener("DOMContentLoaded", () => {
localStorage.setItem("foo", "bar");
document.querySelector("p").innerHTML = "localStorage";

Rethinking issue management

The core problem

FOSS developers suffer burnouts that cause them to loose interest in their projects, and cause the projects to die.

Wondering about why this happens, we came to the conclusion that maintaining a project, especially on the issue tracker part, is felt as a burden and a really annoying thing. Most of FOSS development today is made around Github, which

View sdexstash.js
const publicAddress =
async function findAssets(address) {
const resp = await fetch(`${address}`);
const json = await resp.json();
return json['balances'].filter(balance => balance['asset_type'] != 'native');
async function printBalances(assets) {
View routes_with_constraints.rake
namespace :routes do
desc 'Print out all defined routes in match order, with names, per constraint class. Target specific constraint class with CONSTRAINT=x. Target specific controller with CONTROLLER=x.'
task constrained: :environment do
constraints_routes =
Rails.application.routes.routes.each do |route|
group = ( == ActionDispatch::Routing::Mapper::Constraints ? :constraints ).first.to_s : 'No constraint class')
constraints_routes[group] ||= []

Global tech tax

In reply to

The problem

Many countries are annoyed that big tech companies like Google or Amazon make lot of profit in those countries' markets without paying taxes there.

Their idea: taxing those companies based on the revenue they generate on their

View gist:73ba190958c6212016eb205fed25e9e4
In reply to
1) How do you define the job of "management"?
It's about seeing the big picture and how various tasks articulate, where
managees have to focus on specific tasks.
2) In your opinion what are common misconceptions or outdated principles?
class App.Url
parser_regexp: /^(.*:\/\/)([^:\/]+)(:[^\/]+)?(.*?)(\?.*?)?(#.*)?$/
constructor: ( initial ) ->
initial.replace( @parser_regexp, ( match, @_protocol, @_domain, @_port, @_path, @_params, @_anchor ) => )
@protocol = if @_protocol then @_protocol.replace( /:\/\//, '' ) else ''
@domain = @_domain or ''
@port = if @_port then @_port.replace( /:/, '' ) else ''
@path = @_path or ''
@params = if @_params then @_params.replace( /^\?/, '' ) else ''