Skip to content

Instantly share code, notes, and snippets.

View gu-stav's full-sized avatar
🍿

Gustav Hansen gu-stav

🍿
View GitHub Profile

Notes from Coed:Ethics conference, London, 13 July 2018

Cori Crider - "When data kills" / Weaponised AI

  • Imam Salem bin Ali Jaber preached in Yemen against Islamic extremism; guest at a wedding of relative; hit by a US Hellfire missile fired from a drone. Relative Faisal made contact with Cori, went to Washington DC. No explanation ever made by government (although compensation was paid).
  • Decision-making process behind the attack not known exactly. But there is significant evidence that such attacks serve to further radicalise people; attack results in ~3x more new recruits than extremists killed by attack.
  • Most drone attacks are not on named individuals, but rather "signature strikes" — a euphemism for killing people the military doesn't even know, but who match a certain behavioural pattern (perhaps based on metadata — Hayden: "we kill people based on metadata"
  • Skynet (known through Snowden relevations): use machine learning to try to find courier
@gu-stav
gu-stav / settimeout.js
Last active March 16, 2017 15:17 — forked from gtrufitt/settimeout.js
Test setTimouet
console.log('first script start');
function sleep(milliSeconds){
var startTime = new Date().getTime(); // get the current time
while (new Date().getTime() < startTime + milliSeconds); // hog cpu until time's up
}
sleep(2000)
console.log('first script end');
@gu-stav
gu-stav / pseudo-elements.md
Created April 8, 2016 21:21 — forked from p3t3r67x0/pseudo_elements.md
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@gu-stav
gu-stav / cult_of_ignorance.md
Created December 14, 2015 15:08 — forked from conspect/cult_of_ignorance.md
A Cult Of Ignorance, Isaac Asimov

It's hard to quarrel with that ancient justification of the free press: "America's right to know." It seems almost cruel to ask, ingeniously, "America's right to know what, please? Science? Mathematics? Economics? Foreign languages?"

None of those things, of course. In fact, one might well suppose that the popular feeling is that Americans are a lot better off without any of that tripe.

There is a cult of ignorance in the United States, and there always has been. The strain of anti-intellectualism has been a constant thread winding its way throughout political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

Politicians have routinely striven to speak the language of Shakespeare and Milton as ungrammaticaly as possible in order to avoid offending their audiences by appearing to have gone to school. Thus, Adlai Stevenson, who incautiously allowed intelligence and learning and wit to peep out of his speeches, found the American people

@gu-stav
gu-stav / keep-focus.js
Created July 2, 2013 07:02 — forked from drublic/keep-focus.js
Keep the focus inside a lightbox/ element. Elegant solution.
var tabbableElements = 'a[href], area[href], input:not([disabled]),' +
'select:not([disabled]), textarea:not([disabled]),' +
'button:not([disabled]), iframe, object, embed, *[tabindex],' +
'*[contenteditable]';
var keepFocus = function (context) {
var allTabbableElements = context.querySelectorAll(tabbableElements);
var firstTabbableElement = allTabbableElements[0];
var lastTabbableElement = allTabbableElements[allTabbableElements.length - 1];