Skip to content

Instantly share code, notes, and snippets.

-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema artistlancer
-- -----------------------------------------------------
@Royalone94
Royalone94 / ClearCanvas.java
Created December 14, 2018 03:38 — forked from comoc/ClearCanvas.java
Clear the Canvas of a SurfaceView for Android.
// Obtain a SurfaceView.
// SurfaceView surfaceView = (SurfaceView)findViewById(R.id.surfaceView1);
Canvas canvas = surfaceView.getHolder().lockCanvas();
canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
// Draw someting
surfaceView.getHolder().unlockCanvasAndPost(canvas);
@Royalone94
Royalone94 / MySQL_5-7_macOS.md
Created March 21, 2019 19:16 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@Royalone94
Royalone94 / mysql2-mojave.md
Created March 21, 2019 19:16 — forked from fernandoaleman/mysql2-mojave.md
Install mysql2 on MacOS Mojave

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl
@Royalone94
Royalone94 / temp.php
Created May 29, 2019 08:47 — forked from ugraphix/temp.php
Temperature conversions (Fahrenheit, Celsius, Kelvin) using PHP
<?php
//temp.php
//Celsius to Fahrenheit ° F = 9/5 ( ° C) + 32
//Fahrenheit to Celsius ° C = 5/9 (° F - 32)
//Celsius to Kelvin K = ° C + 273.15
//Kelvin to Celsius ° C = K - 273.15
//Fahrenheit to Kelvin K = 5/9 (° F - 32) + 273.15
//Kelvin to Fahrenheit ° F = 9/5 (K - 273.15) + 32
@Royalone94
Royalone94 / toUnicode.js
Created July 11, 2019 13:01 — forked from littlee/toUnicode.js
JavaScript convert string to unicode format
function toUnicode(str) {
return str.split('').map(function (value, index, array) {
var temp = value.charCodeAt(0).toString(16).toUpperCase();
if (temp.length > 2) {
return '\\u' + temp;
}
return value;
}).join('');
}
@Royalone94
Royalone94 / toUnicode.js
Created July 11, 2019 13:01 — forked from littlee/toUnicode.js
JavaScript convert string to unicode format
function toUnicode(str) {
return str.split('').map(function (value, index, array) {
var temp = value.charCodeAt(0).toString(16).toUpperCase();
if (temp.length > 2) {
return '\\u' + temp;
}
return value;
}).join('');
}
@Royalone94
Royalone94 / index.js
Created October 3, 2019 17:06 — forked from akexorcist/index.js
Axios post method requesting with x-www-form-urlencoded content type
const axios = require('axios')
const qs = require('querystring')
...
const requestBody = {
name: 'Akexorcist',
age: '28',
position: 'Android Developer',
description: 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/',
@Royalone94
Royalone94 / README.md
Created October 4, 2019 14:52 — forked from luciopaiva/_Full-socketio-client-and-server-example.md
Full socket.io client and server example

Full socket.io client and server example

To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.

How to use

Create a folder, run npm init -f on it and paste both server.js and client.js there (see files below). Needless to say, you must have Node.js installed on your system.

Install the required libraries:

Moving Files with SharePoint Online REST APIs in Microsoft Flow

About

This is an overview of how to move files with Microsoft Flow using the SharePoint - Send an HTTP request to SharePoint action and SharePoint Online REST APIs.

These SharePoint Online REST APIs can be used outside of Flow, but you will need to handle authentication and provide an X-RequestDigest header with any POST requests (as with any SP REST POST request).

In the case of Flow's SharePoint - Send an HTTP request to SharePoint action, authentication is handled for you and you do not need to provide the X-RequestDigest header.