Skip to content

Instantly share code, notes, and snippets.

:shipit:
Shipping React Apps

Albin Ekblom albinekb

:shipit:
Shipping React Apps
Block or report user

Report or block albinekb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4702cee2f5c46a22d3d5
// run at http://www.google.com/design/spec/style/color.html#color-ui-color-palette
var hex = "";
var rgb = "";
var g = document.getElementsByClassName('color-group');
for (var i = 0; i < g.length; i++){
var c = g[i].getElementsByClassName('color');
var title = c[0].textContent.split('\n')[1].replace(/\s+/g, '');
title = title.charAt(0).toLowerCase() + title.substring(1);
for (var a = 1; a < c.length; a++){
hex += ('@' + title + '--' + c[a].textContent.split('#')[0] + ': #' + c[a].textContent.split('#')[1] + ';\n')
View gist:397a1e0a59a570c5d05f
<?php
$url = 'http://merchant.admin.cdon.com/api/importfile';
$key = 'nanana BATMAN';
$file_name_with_full_path = realpath('./Clothing.xlsx');
$post = array('name' => 'file', 'filename' => 'Clothing.xlsx', 'file_contents'=>'@'.$file_name_with_full_path);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$target_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
View Github automerge
function run () {
const updateButton = document.querySelector('.branch-action-btn button')
const mergeButton = document.querySelector('.merge-message button')
if (mergeButton.disabled && !updatebutton.disabled) {
updateButton.click()
} else if (!mergeButton.disabled) {
mergeButton.click()
}
View keybase.md

Keybase proof

I hereby claim:

  • I am albinekb on github.
  • I am albinekb (https://keybase.io/albinekb) on keybase.
  • I have a public key ASBem00Ix1bA21Vuxs3K1_u4BmsHlorepKhQSFuloeLkcQo

To claim this, I am signing this object:

View gist:e3867192a5eb2c1755f3
Dexter = function () {
'use strict';
this.Cheerio = Npm.require('cheerio');
this.Request = Npm.require('request');
this.Future = Npm.require('fibers/future');
this.service = 'dexter';
this.jar;
this.url;
View gist:f24c2b9dac9f382b444258db3f8b7e91
```
Portage 2.3.5 (python 2.7.12-final-0, hardened/linux/amd64/selinux, gcc-5.4.0, glibc-2.23-r3, 4.9.24-hardened x86_64)
=================================================================
System uname: Linux-4.9.24-hardened-x86_64-AMD_Ryzen_7_1800X_Eight-Core_Processor-with-gentoo-2.3
KiB Mem: 16246768 total, 11212408 free
KiB Swap: 16777212 total, 16777212 free
Timestamp of repository gentoo: Sat, 20 May 2017 03:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
@albinekb
albinekb / start-services.sh
Created May 28, 2017 — forked from eduardoromero/start-services.sh
Starting Xvfb with start-services.sh
View start-services.sh
#!/usr/bin/env bash
set -e
# Start Xvfb
Xvfb -ac -screen scrn 1280x800x24 :9.0 &
export DISPLAY=:9.0
exec "$@"
@albinekb
albinekb / Dockerfile
Created May 28, 2017 — forked from eduardoromero/Dockerfile
Dockerfile for Node 7 with xvfb
View Dockerfile
FROM node:7
RUN apt-get update &&\
apt-get install -y libgtk2.0-0 libgconf-2-4 \
libasound2 libxtst6 libxss1 libnss3 xvfb
# Exposing port 5000 (micro)
EXPOSE 5000
WORKDIR /app
View vlc
vlc \
screen:// \
-I rc \
--screen-left=0 --screen-top=0 --screen-width=800 --screen-height=600 \
--sout "#transcode{vcodec=h264,vb=800,fps=5,scale=1,acodec=none}:duplicate{dst=std{access=file,mux=mp4,dst='./screen.mp4'}}"
View proxy.js
const http = require('http')
const httpProxy = require('http-proxy')
const PORT = 3005
const TARGET = 'http://example.com:80'
const USER = ''
const PASSWORD = ''
const options = {
auth: `${USER}:${PASSWORD}`,
You can’t perform that action at this time.