Skip to content

Instantly share code, notes, and snippets.

View xupefei's full-sized avatar
🏠
Definitely working from home

Paddy Xu xupefei

🏠
Definitely working from home
View GitHub Profile
library(ggplot2)
library(tikzDevice)
options(
tikzLatexPackages = c(
getOption('tikzLatexPackages'),
"\\usepackage{libertine}",
"\\usepackage{libertinust1math}",
"\\usepackage[T1]{fontenc}"
)
theme_Publication <- function(base_size = 16) {
library(grid)
library(ggthemes)
(
theme_foundation(base_size = base_size)
+ theme(
plot.title = element_text(
face = "bold",
size = rel(1.2),
hjust = 0.5
@xupefei
xupefei / gist:5481027
Created April 29, 2013 11:20
CatSystem2 layer_rename.jsx
#target photoshop
app.bringToFront();
var layers = activeDocument.layers;
for (var i = 0; i < layers.length; i++) {
if(layers[i].name[0] == '[')
layers[i].name = layers[i].name.replace(".png", "");
else
layers[i].name = "@(" + layers[i].name.replace(".png", "") + ")";
@xupefei
xupefei / gist:5481023
Created April 29, 2013 11:19
CatSystem2 HG3 Offset Generator
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Text;
using DataHelper;
namespace HG3_Offset_Generator
{
@xupefei
xupefei / CST_Exporter.cs
Created April 10, 2013 11:04
CatSystem2 CST tools
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using DataHelper;
namespace CST_Exporter
{
internal class Program