Skip to content

Instantly share code, notes, and snippets.

View x5engine's full-sized avatar
🎉
Winning

X5 Engine x5engine

🎉
Winning
View GitHub Profile
@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
@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 {
@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

@EyMaddis
EyMaddis / whatsapp-send-in-current-chat.js
Created November 4, 2016 12:50
Sending messages programmatically on web.whatsapp.com
// this allows to send arbitrary messages. The chat conversation you want to send messages to has to be open.
// just run this in the JS console
// http://stackoverflow.com/a/39165137/1249001
function findReactComponent(dom) {
for (var key in dom)
if (key.startsWith("__reactInternalInstance$")) {
var compInternals = dom[key]._currentElement;
var compWrapper = compInternals._owner;
var comp = compWrapper._instance;
@codediodeio
codediodeio / database.rules.json
Last active May 11, 2025 08:08
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@hamrammi
hamrammi / whatsapp-send-in-current-chat.js
Last active March 22, 2020 13:47 — forked from EyMaddis/whatsapp-send-in-current-chat.js
Sending messages programmatically on web.whatsapp.com
// this allows to send arbitrary messages. The chat conversation you want to send messages to has to be open.
// just run this in the JS console
// http://stackoverflow.com/a/39165137/1249001
function findChatComponent(dom) {
var result = null
for (var key in dom) {
if (key.startsWith("__reactInternalInstance$")) {
try {
result = dom[key].child.child.memoizedProps.children._owner.stateNode.props.chat
@princessjanf
princessjanf / locationA.js
Last active October 26, 2019 08:06
Final Code For React Native's Geolocation
import React, { Component } from "react";
import { AppRegistry, StyleSheet, Dimensions, Image, View, StatusBar, TouchableOpacity } from "react-native";
import { Container, Text } from "native-base";
import MapView from 'react-native-maps';
import Polyline from '@mapbox/polyline';
class LocationA extends Component {
constructor(props) {
@justsml
justsml / fetch-api-examples.md
Last active April 22, 2025 13:44
JavaScript Fetch API Examples
@sulejirl
sulejirl / ethereum-backend.js
Last active February 14, 2023 21:13
Ethereum: Sending Transaction via NodeJS Backend Tutorial
const web3 = require('web3');
const express = require('express');
const Tx = require('ethereumjs-tx');
const app = express();
//Infura HttpProvider Endpoint
web3js = new web3(new web3.providers.HttpProvider("https://rinkeby.infura.io/YOUR_API_KEY"));
app.get('/sendtx',function(req,res){
@carsonfarmer
carsonfarmer / default
Created June 18, 2018 22:59
Nginx config
server {
server_name ipfs.my-domain-name.com;
listen [::]:4002 ssl ipv6only=on;
listen 4002 ssl;
ssl_certificate /etc/letsencrypt/live/ipfs.my-domain-name.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ipfs.my-domain-name.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
proxy_pass http://127.0.0.1:8081;