Skip to content

Instantly share code, notes, and snippets.

@aliustaoglu
aliustaoglu / GitHub-Forking.md
Created April 4, 2018 20:20 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

  1. Download and install https://github.com/ledongthuc/example/blob/master/file/CH34x_Install_V1.3.zip
  2. nano /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/platform.txt
  • Find -P{serial.port} and wrap in double quotes (if not already wrapped)
  1. nano /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/programmers.txt
  • Find -P{serial.port} and wrap in double quotes (if not already wrapped)
@aliustaoglu
aliustaoglu / .babelrc
Created May 2, 2018 20:48
Customising Ant.design theme
{
"env": {
"test": {
"plugins": [
/* DON'T SET import Plugin for unit test environment if you're using JEST */
]
},
"development": {
"plugins": [
["import", { "libraryName": "antd", "libraryDirectory": "es"}]
@aliustaoglu
aliustaoglu / uuid.js
Created May 10, 2018 03:17 — forked from jcxplorer/uuid.js
UUID v4 generator in JavaScript (RFC4122 compliant)
function uuid() {
var uuid = "", i, random;
for (i = 0; i < 32; i++) {
random = Math.random() * 16 | 0;
if (i == 8 || i == 12 || i == 16 || i == 20) {
uuid += "-"
}
uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16);
}
@aliustaoglu
aliustaoglu / README.md
Created June 21, 2018 09:12
How to install ESP32 for Ardino IDE on MacOS

Install python 2.7 if you don't already have

pip install wget
mkdir -p /Users/cuneytaliustaoglu/Documents/Arduino/hardware/espressif
cd /Users/cuneytaliustaoglu/Documents/Arduino/hardware/espressif
git clone https://github.com/espressif/arduino-esp32.git esp32
cd esp32
git submodule update --init --recursive
cd tools
@aliustaoglu
aliustaoglu / README.md
Created June 21, 2018 10:22
How to install ESP32 for Ardino IDE on Windows
@aliustaoglu
aliustaoglu / README.md
Created August 22, 2018 03:50
Watch webpack in production environment with create-react-app (react-scripts)

This configuration works with maven spring framework.

This requires react-app-rewired as dev dependency.

Build script stays as is, add a watch script that will trigger config-overrides using react-app-rewired and it will watch webpack.

{
"scripts": {
 "build": "react-scripts build",

Awesome MQTT

Awesome

A curated list of MQTT related stuff.

MQTT is a lightweight client-server publish/subscribe messaging protocol, optimized for high-latency or unreliable networks. This protocol is a good choice for Internet of Things applications, Telemetry, Sensor Networks, Smart Metering, Home Automation, Messaging and Notification Services.

Contents

'use strict';
const nJwt = require('./njwt'); //https://www.npmjs.com/package/njwt
const signingKey = 'my super secret key';
exports.handler = function(event, context, callback) {
var token = event.authorizationToken || event.Authorization || event.token;
nJwt.verify(token, signingKey, function(err, verifiedJwt) {
if (err) {
@aliustaoglu
aliustaoglu / react-native-macos-package-scripts.json
Last active February 15, 2019 22:59
Scripts needed to run React-Native-Macos and solve problems when they happen
{
"start": "node node_modules/react-native-macos/local-cli/cli.js start",
"ios": "react-native run-ios",
"android": "react-native run-android",
"macos": "react-native-macos run-macos",
"test": "jest",
"bundle": "react-native-macos bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform macos",
"debugger-open": "rndebugger-open --port 8081",
"watchman-clear": "watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache",
"install-3rd-party": "cd node_modules/react-native-macos && scripts/macos-install-third-party.sh"