git clone https://gist.github.com/08be90a2f21205062ccc.git
$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png
> [email protected] start /Users/bsergean/src/offscreen_sample
git clone https://gist.github.com/08be90a2f21205062ccc.git
$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png
> [email protected] start /Users/bsergean/src/offscreen_sample
/** | |
* You may use this function with both 2 or 3 interval colors for your gradient. | |
* For example, you want to have a gradient between Bootstrap's danger-warning-success colors. | |
*/ | |
function colorGradient(fadeFraction, rgbColor1, rgbColor2, rgbColor3) { | |
var color1 = rgbColor1; | |
var color2 = rgbColor2; | |
var fade = fadeFraction; | |
// Do we have 3 colors for the gradient? Need to adjust the params. |
<a class="item" href="https://your.domain.here{{.RepoLink}}" data-iframe-tab="builds" title="Builds"> | |
<i class="octicon octicon-gear"></i> <img src="https://your.domain.here/api/badges{{.RepoLink}}/status.svg?ref=refs/heads/master" style="width: auto"> | |
</a> | |
<script> | |
document.addEventListener('DOMContentLoaded', () => { | |
const openFrame = (tab) => { | |
const name = tab.dataset.iframeTab; | |
const page = tab.href; |
Everyone who interacts with computers has in important ways always already been programming them.
Every time you make a folder or rename a file on your computer, the actions you take through moving your mouse and clicking on buttons, translate into text-based commands or scripts which eventually translate into binary.
Why are the common conceptions of programmer and user so divorced from each other? The distinction between programmer and user is reinforced and maintained by a tech industry that benefits from a population rendered computationally passive. If we accept and adopt the role of less agency, we then make it harder for ourselves to come into more agency.
We've unpacked the "user" a little, now let's look at the "programmer." When a programmer is writing javascript, they are using prewritten, packaged functions and variables in order to carry out the actions they want their code to do. In this way, the programmer is also the user. Why is using pre-made scripts seen
const ROOM_URL = "https://hub.link/cmPv8xv" | |
var HEADLESS_BROWSER = true | |
var puppeteer = require('puppeteer'); | |
var browser | |
var page | |
async function launchBrowser () { | |
browser = await puppeteer.launch({headless: HEADLESS_BROWSER}); |
#!/bin/bash | |
# https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/uploading-media/media-best-practices | |
# - h.264 high profile | |
# - 60fps or less | |
# - aac-lc, he-aac not supported | |
# - 16:9 recommended | |
# - 512mb maximum | |
# - shorter than 140s | |
# - 1:1 pixel aspect ratio | |
# - yuv 4:2:0 |
<?php | |
//method 1 - faster | |
//host this webpage on your server, Heroku or any other host | |
//paste your link to a Hubs Page using the format: | |
//https://yourserver.com/yourpath/link.php?img=https://yourserver.com/yourpath/yourimage.jpgorpng&url=https://anyotherserver.com/finallink | |
//this will trick Hubs to capture a snapshot of the image "img", so keep it in the 16:9 ratio for instance 1280x720 | |
?> | |
<!DOCTYPE html> | |
<html> |
var HID = require('node-hid'); | |
const express = require('express'); | |
// Steam Neptune Controller | |
var device = new HID.HID("/dev/hidraw3"); | |
var port = 8000 | |
var controller = { | |
id: "Steam Controller (Neptune)", | |
index: 0, |