Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block sunnyone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sunnyone / hoge.html
Created Jun 22, 2019
performance trace
View hoge.html
window.perf1start =;
<link rel="stylesheet" href="" />
var perf1 = - window.perf1start;
sunnyone /
Created Apr 25, 2019
cd /work
exec bundle exec bin/gollum -p 80 /wiki
View gist:d3cd8e10159c3be7792c8dc41ede193e
FROM ruby
RUN apt-get -y update && apt-get -y install libicu-dev cmake && rm -rf /var/lib/apt/lists/*
COPY . /work
RUN cd /work && bundle install --path vendor/bundle
ENTRYPOINT ["/work/"]
View AspNetIdentityV2PasswordEncoder.kt
import java.util.Base64
import javax.crypto.SecretKeyFactory
import javax.crypto.spec.PBEKeySpec
class AspNetIdentityV2PasswordEncoder : PasswordEncoder {
View ManageScroll.js
import React from "react";
import { Location } from "@reach/router";
let scrollPositions = {};
class ManageScrollImpl extends React.Component {
componentDidMount() {
try {
// session storage will throw for a few reasons
// - user settings
View tsconfig-test.json
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
View CustomizedNamedParameterJdbcTemplate.kt
fun convert(value: Any?, sqlType: Int, typeName: String?): Triple<Any?, Int, String?> {
if (value is CodedEnum) {
return Triple(value.code, sqlType, typeName)
return Triple(value, sqlType, typeName)
open class CustomizedNamedParameterJdbcTemplate(classicJdbcTemplate: JdbcOperations) :
View SpringDataJdbcConfig.kt
open class SpringDataJdbcConfig : JdbcConfiguration() {
open fun namedParameterJdbcTemplate(jdbcTemplate: JdbcTemplate): NamedParameterJdbcTemplate {
return CustomizedNamedParameterJdbcTemplate(jdbcTemplate)
sunnyone / webpack.config.js
Created Sep 23, 2018
webpack-dev-server proxy example
View webpack.config.js
devServer: {
contentBase: 'dist',
host: '',
port: 3000,
proxy: {
'/myapp/api': {
target: 'http://api-server:8080'
'/myapp': {
target: 'http://localhost:3000/examples/index.html',
View gist:422f2b23c5f497bf099035a80002bad8
sudo ln -s /usr/lib/x86_64-linux-gnu/ /opt/HipChat4/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/ /opt/HipChat4/lib/
You can’t perform that action at this time.