Skip to content

Instantly share code, notes, and snippets.

View x5engine's full-sized avatar
🎉
Winning

X5 Engine x5engine

🎉
Winning
View GitHub Profile
@basilesimon
basilesimon / README.md
Last active October 18, 2022 07:44
discreet-whatsapp-web

A more discreet Whatsapp

This stylesheet intends to render the Whatsapp Web interface more discreet.

It will hide contact names and blur their pictures just enough so you recognise them.
The messages themselves will be blurred as well and reveal on hovering them with your mouse.
Incoming and outgoing pictures and media will be blurred and greyed out to remove obvious colour dominances, such as blood or skin.

Installation

@harlantwood
harlantwood / ipfs-add-file.js
Last active July 18, 2021 08:09
Upload a binary file to IPFS via React.
// This is DEPRECATED, see a full running example here instead:
// https://github.com/ipfs/js-ipfs-api/tree/97f6ed27d72b189c02865cb0fdd4f58fafd89625/examples/upload-file-via-browser
import React from 'react'
import IpfsApi from 'ipfs-api'
const Buffer = require('buffer/').Buffer
export default class AddMedia extends React.Component {
constructor {
@jshimko
jshimko / docker-ssl-deployment.sh
Last active February 25, 2022 10:11
Deploy Reaction Commerce on Digital Ocean with Nginx and a Let's Encrypt SSL certificate
# start a server on Digital Ocean
# https://docs.docker.com/machine/drivers/digital-ocean/
docker-machine create \
--driver digitalocean \
--digitalocean-access-token <YOUR API KEY> \
--digitalocean-size 2gb \
reaction
# tell Docker to run commands on that server
@rcugut
rcugut / node-npm-install.md
Last active February 2, 2024 11:51 — forked from DanHerbert/fix-homebrew-npm.md
Install node & npm on Mac OS X with Homebrew

DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Why I hate TypeScript

Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.

Not Standard

TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.

Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.

Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!

var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
@fliedonion
fliedonion / !javascript in bat file.md
Last active June 10, 2023 14:49
How to Embed Javascript code in Windows Bat File.
Summary One example for embed javascript into windows bat file without any external tools or files.
Env windows node.js jscript
@walaura
walaura / gist:5752f1d36d0707b431d3
Last active March 18, 2020 17:10
Get the most used words from whatsapp chat logs by person/global
/*
- Go to the group chat settings and email yourself the chat log
(no attachments), use that txt here.
(You'll need an android phone or some tweaking of the regex on
line 11 to make this work.)
- You might also need to create a /us folder for the --export
option to work but let's not get ahead of ourselves here.
You still havent even sent yourself the log, have you?
*/
import os, os.path, time, urllib, urllib2, json, datetime
base = os.getcwd() + '/packages/'
apiUrl = 'https://atmospherejs.com/a/packages/findByNames'
for dirname in os.listdir(base):
max_mtime = 0
if os.path.isdir(base + dirname):
packageName = dirname.replace('-', ':', 1)
for fname in os.listdir(base + dirname):
full_path = base + dirname + '/' + fname
downloadArquivo("./video.ogv", function(progresso, total, perc) {
document.querySelector("progress").value = perc;
}).then(function(arrayBuffer) {
//cria um Blob a partir do arrayBuffer
var blob = new Blob([arrayBuffer], {
type: "video/ogg"
});
//cria o elemento video
var video = document.createElement("video");
video.autoplay = true;