Skip to content

Instantly share code, notes, and snippets.

View yh-luo's full-sized avatar

Yu-Han Luo yh-luo

  • Taipei, Taiwan
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active May 1, 2024 14:51
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@jbxbergdev
jbxbergdev / marker_icon_generator.dart
Last active December 7, 2023 11:09
Creates a BitmapDescriptor from an IconData object to be used for google_maps_flutter map markers. Read the Medium article here: https://medium.com/@JBXBergDev/how-to-use-googlemap-markers-with-flutter-material-icons-38c4c975e928
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class MarkerGenerator {
final _markerSize;
double _circleStrokeWidth;
double _circleOffset;
@kostyay
kostyay / FoxitReaderFedora26
Created July 27, 2017 08:11
How to get Foxit Reader to run on Fedora 26
cd ~/opt/foxitsoftware/foxitreader
ln -s /lib64/libssl.so.10 lib/libssl.so.1.0.0
ln -s /lib64/libcrypto.so.10 lib/libcrypto.so.1.0.0
@tomhopper
tomhopper / plot_aligned_series.R
Last active June 25, 2023 17:36
Align multiple ggplot2 graphs with a common x axis and different y axes, each with different y-axis labels.
#' When plotting multiple data series that share a common x axis but different y axes,
#' we can just plot each graph separately. This suffers from the drawback that the shared axis will typically
#' not align across graphs due to different plot margins.
#' One easy solution is to reshape2::melt() the data and use ggplot2's facet_grid() mapping. However, there is
#' no way to label individual y axes.
#' facet_grid() and facet_wrap() were designed to plot small multiples, where both x- and y-axis ranges are
#' shared acros all plots in the facetting. While the facet_ calls allow us to use different scales with
#' the \code{scales = "free"} argument, they should not be used this way.
#' A more robust approach is to the grid package grid.draw(), rbind() and ggplotGrob() to create a grid of
#' individual plots where the plot axes are properly aligned within the grid.
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream