Skip to content

Instantly share code, notes, and snippets.

@doskoi
doskoi / enhancement-r18.js
Created April 11, 2024 11:32
m-team/javbus预览/javlibrary评分/jable在线播放联动
// ==UserScript==
// @name m-team/javbus预览/javlibrary评分/jable在线播放联动
// @namespace m-team javbus javlibrary jable connector
// @version 2.1
// @description enjoy yourself
// @license 1285500
// @author 1285500
// @include *://jable.tv/*
// @include *://www.javbus.com/*
// @include *://www.javlibrary.com/*
@doskoi
doskoi / raven.sh
Last active September 4, 2018 16:06
Raven build environment setup
#!/bin/bash
# author @doskoi
# Raven build environment setup
RAVENDIR="$HOME/raven"
ESPDIR="$RAVENDIR/esp"
mkdir -p $RAVENDIR
mkdir -p $ESPDIR
@doskoi
doskoi / ssr
Created November 3, 2017 15:33
#! /bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#=================================================================#
# System Required: CentOS 6,7, Debian, Ubuntu #
# Description: One click Install ShadowsocksR Server #
# Author: 91yun #
# Thanks: @breakwa11 <https://twitter.com/breakwa11> #
# Thanks: @Teddysun <[email protected]> #
# Intro: https://shadowsocks.be/9.html #
@doskoi
doskoi / xcode_ramdisk.sh
Created April 26, 2017 05:06 — forked from skeeet/xcode_ramdisk.sh
Create a RAM disk for using with XCode
#!/bin/sh
# Create a RAM disk with same perms as mountpoint
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions
# Usage: sudo ./xcode_ramdisk.sh start
USERNAME=$(logname)
TMP_DIR="/private/tmp"
RUN_DIR="/var/run"
SYS_CACHES_DIR="/Library/Caches"
@doskoi
doskoi / unused.sh
Created August 29, 2014 09:03
Unused
#!/bin/sh
PROJ=`find . -name '*.xib' -o -name '*.[mh]'`
for png in `find . -name '*.png'`
do
name=`basename $png`
if ! grep -qhs "$name" "$PROJ"; then
echo "$png is not referenced"
fi
done
@doskoi
doskoi / .gitignore
Created May 30, 2014 05:28
.gitignore file for Rails
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
@doskoi
doskoi / .gitignore
Created May 28, 2014 15:36
.gitignore file for Xcode
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@doskoi
doskoi / gist:11367026
Created April 28, 2014 09:45
Reveal.app loader
expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);
expr [(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
continue
@doskoi
doskoi / CGAffineTransformMakeSkew
Created April 8, 2014 07:48
CGAffineTransformMakeSkew for make skew transform
CGAffineTransform CGAffineTransformMakeSkew (CGFloat degree) {
CGAffineTransform t = CGAffineTransformIdentity;
t.c = (degree * M_PI / 180.0f);
return t;
}
@doskoi
doskoi / gist:8577224
Created January 23, 2014 11:42
A better version of NSLog
#define NSLog(format, ...) do { \
fprintf(stderr, "<%s : %d> %s\n", \
[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], \
__LINE__, __func__); \
(NSLog)((format), ##__VA_ARGS__); \
fprintf(stderr, "-------\n"); \
} while (0)