Skip to content

Instantly share code, notes, and snippets.

Avatar

kik oelmekki

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

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
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 Mars2.md

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
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>
<html>
<head>
<script>
document.addEventListener("DOMContentLoaded", () => {
localStorage.setItem("foo", "bar");
document.querySelector("p").innerHTML = "localStorage";
});
</script>
</head>
View issue-management.md

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 =
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
async function findAssets(address) {
const resp = await fetch(`https://horizon.stellar.org/accounts/${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
Rails.application.reload_routes!
constraints_routes = Hash.new
Rails.application.routes.routes.each do |route|
group = (route.app.class == ActionDispatch::Routing::Mapper::Constraints ? route.app.send( :constraints ).first.to_s : 'No constraint class')
constraints_routes[group] ||= []
View global_tech_tax.md

Global tech tax

In reply to https://twitter.com/nico_lrx/status/910818326179323904

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 https://twitter.com/andreasklinger/status/913614778718871552
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?
View url.coffee
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 ''