Skip to content

Instantly share code, notes, and snippets.

@guangtuan
guangtuan / clearCSDNArticleDetail.js
Created August 25, 2018 01:53
clear csdn article detail
// ==UserScript==
// @name clear csdn article detail
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://blog.csdn.net/*/article/details/*
// @grant none
// ==/UserScript==
@fhefh2015
fhefh2015 / v.php
Last active January 19, 2025 13:41
抖音无水印下载地址
<?php
/**
* Created by PhpStorm.
* User: aric
* Date: 18/7/10 上午9:34
*/
//获取重定向最终网址
function get_redirect_final_target($url)
{
// ==UserScript==
// @name 去你大爷的 CSDN 全文阅读
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 把登录后查看全文阅读的那个啥玩意儿给干掉
// @author laobubu
// @match http://blog.csdn.net/*/article/details/*
// @grant none
// ==/UserScript==
@evanwill
evanwill / gitBash_windows.md
Last active March 15, 2025 02:31
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@Paloghas
Paloghas / PreviewTestNew.cs
Last active June 14, 2023 11:01
Displaying Camera Preview on Android with Unity
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
using System;
using UnityEngine.Assertions;
public class PreviewTestNew : MonoBehaviour {
AndroidJavaClass androidNativeCam;
AndroidJavaObject androidNativeCamActivity;
@jtbonhomme
jtbonhomme / jira-behing-nginx-ssl
Created September 26, 2015 07:49 — forked from alertor/jira-behing-nginx-ssl
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@TomoakiNagahara
TomoakiNagahara / file0.cs
Last active May 22, 2018 05:39
How to using UniWebView2 (UniWebView2の使用方法) ref: http://qiita.com/TomoakiNagahara/items/2785c85c7b416f88e08f
using UnityEngine;
using System.Collections;
public class Main : MonoBehaviour {
private UniWebView _webView;
private string _errorMessage;
// Use this for initialization
@JakubNei
JakubNei / DeferredSynchronizeInvoke.cs
Last active December 29, 2024 10:46
Implementation of ISynchronizeInvoke for Unity3D game engine. Can be used to invoke anything on main Unity thread. ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well. I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
/*
Implementation of ISynchronizeInvoke for Unity3D game engine.
Can be used to invoke anything on main Unity thread.
ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well.
I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
help from: http://www.codeproject.com/Articles/12082/A-DelegateQueue-Class
example usage: https://gist.github.com/aeroson/90bf21be3fdc4829e631
version: aeroson 2017-07-13 (author yyyy-MM-dd)
@lemiorhan
lemiorhan / post-receive
Last active January 15, 2025 16:12
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@onevcat
onevcat / VVSnowShader.shader
Created August 31, 2013 07:49
Shader of a snow effect.
Shader "Custom/VVSnowShader" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_Bump ("Bump", 2D) = "bump" {}
_Snow ("Snow Level", Range(0,1) ) = 0
_SnowColor ("Snow Color", Color) = (1.0,1.0,1.0,1.0)
_SnowDirection ("Snow Direction", Vector) = (0,1,0)
_SnowDepth ("Snow Depth", Range(0,0.3)) = 0.1
}
SubShader {