Skip to content

Instantly share code, notes, and snippets.

@sean-lin
sean-lin / click.py
Last active August 10, 2016 04:42
python windows auto click
# -*- coding: utf-8 -*-
import time
import win32con
import win32api
import ctypes
from ctypes import wintypes
byref = ctypes.byref
user32 = ctypes.windll.user32
@NovaSurfer
NovaSurfer / SceneRestart.cs
Last active March 25, 2018 02:50
Restart current scene in Unity 5.0 using new SceneManager
/*
For more details, please follow the link below:
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.html
*/
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections;
public class SceneRestart : MonoBehaviour {
@cloudwu
cloudwu / mymod.user.lua
Created October 26, 2015 12:05
user defined loader
local M = {}
function M.test(...)
print(...)
end
return M
@cjddmut
cjddmut / EasingFunctions.cs
Last active July 16, 2024 08:20
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@cloudwu
cloudwu / inject.lua
Last active March 28, 2023 16:33
Inject code with locals and upvalues
local FUNC_TEMP=[[
local $ARGS
return function(...)
$SOURCE
end,
function()
return {$LOCALS}
end
]]
@cofyc
cofyc / xrunc
Created January 24, 2015 16:12
A handy tool to compile and execute C source directly.
#!/usr/bin/env python
#
# A handy tool to compile and execute C source directly.
#
# @author Yecheng Fu <cofyc.jackson@gmail.com>
import os
import sys
import tempfile
import subprocess
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,