Skip to content

Instantly share code, notes, and snippets.

View GeorgioWan's full-sized avatar
😏
I'll be back

OAwan GeorgioWan

😏
I'll be back
View GitHub Profile
module.exports = {
type: 'react-component',
npm: {
cjs: false,
esModules: false,
umd: false
},
polyfill: false,
webpack: {
config(config) {
module.exports = {
type: 'react-component',
npm: {
cjs: false,
esModules: false,
umd: false
},
polyfill: false,
webpack: {
config(config) {
@GeorgioWan
GeorgioWan / Hex_Base64.js
Last active November 10, 2022 14:21
Hex & Base64 Encode Decode
// Hex to Base64
function hexToBase64(str) {
return btoa(String.fromCharCode.apply(null,
str.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" "))
);
}
// Base64 to Hex
function base64ToHex(str) {
for (var i = 0, bin = atob(str.replace(/[ \r\n]+$/, "")), hex = []; i < bin.length; ++i) {
@GeorgioWan
GeorgioWan / _linear-gradient.scss
Created June 13, 2017 06:52 — forked from ykhs/_linear-gradient.scss
linear-gradient Sass Mixin
@mixin linear-gradient($angle, $color-stops...) {
$_angle-with-vendor-prefix: "";
$_angle: "";
@if $angle == "to top" or $angle == "bottom" {
$_angle-with-vendor-prefix: bottom;
$_angle: to top;
} @else if $angle == "to right" or $angle == "left" {
$_angle-with-vendor-prefix: left;
$_angle: to right;
} @else if $angle == "to bottom" or $angle == "top" {
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@GeorgioWan
GeorgioWan / ssl-redirect.html
Created June 4, 2016 01:43 — forked from konklone/ssl-redirect.html
Force a quick redirect to HTTPS on Github Pages for your domain (and only your domain)
<script>
var host = "YOURDOMAIN.github.io";
if ((host == window.location.host) && (window.location.protocol != "https:"))
window.location.protocol = "https";
</script>
@GeorgioWan
GeorgioWan / git_toturial
Created May 31, 2016 06:14 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@GeorgioWan
GeorgioWan / GistFile.cs
Last active December 16, 2015 19:00 — forked from imZack/gist:5481767
C# find-all-controls-in-wpf-window-by-type
/// <summary>
/// Form: http://stackoverflow.com/questions/974598/find-all-controls-in-wpf-window-by-type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="depObj"></param>
/// <returns></returns>
public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
{
if (depObj != null)
{