Skip to content

Instantly share code, notes, and snippets.

View andreineculau's full-sized avatar
:bowtie:

Andrei Neculau andreineculau

:bowtie:
View GitHub Profile
@andreineculau
andreineculau / 1.pre.sh
Last active October 26, 2016 13:52
Jenkins - kill all subprocesses in the pre- or post-build phase
set +x
# Add this as the 1st build Exec shell
# Only for situations where you have 1 and only 1 executor per machine
# And you don't care about processes being left running after the job run ends
# Look for processes that have a BUILD_ID env var
# that is NOT the same as the current job's BUILD_ID
# nor same as dontKillMe
echo "Killing orphan spawned processes..."
@andreineculau
andreineculau / gist:5970012
Created July 10, 2013 20:25
andreineculau: Programming is not only syntax/semantics. Leave that to a readability/simplicity benchmark. Focus on models, patterns, higher level stuff

rambling re: tweet

By no means do I want to sound assertive. I lack a lot of knowledge in the area, so please slap me and set me straight, teach me a thing or two. The only thing that I standby is that it is stupid to explain syntax, to re-invent syntax, to argue about syntax, to have a liberal syntax, etc. Whatever does not matter (i.e. produce added value) should be standardized IMO. Eliminate mundane topics from the discussion to elevate the quality level. There are better things to do. That said readability, performance, simplicity, portability, ... still matter. A lot, I'd say.

Dictionary to level-off the communication

  • syntax - something that a parser can recognize e.g. PEG; the string 'function'
  • semantics - something that a parser can associate syntax to. e.g. AST/parse tree; the fact that the string 'function' is associated with the concept of a function
  • higher level stuff - paradigms (OOP, FP, LP, etc), models/concepts (monads, clas
@andreineculau
andreineculau / 1_reference_class_by_name.coffee
Created October 31, 2012 08:10
call static properties of the current class in coffeescript
class A
@temp: 'A'
constructor: () ->
console.log A.temp
class B extends A
@temp: 'B'
constructor: () ->
super
console.log B.temp
@andreineculau
andreineculau / gist:2647886
Created May 9, 2012 18:42
REST: filtering
If you have
/cars
/cars/{carId}
/individuals
/individuals/{individualId}
and then
/individuals/andrei
needs to link to my cars, which would be /cars?individual=andrei
(( side-tracking here: maybe http://api.garage.com/cars?individual=http://api.garage.com/individuals/andrei seems better since the URIs are the IDs ? wdyt? ))