Skip to content

Instantly share code, notes, and snippets.

@lumin3000
lumin3000 / build_raylib_for_sonoma.sh
Created April 25, 2024 06:04 — forked from wilsonsilva/build_raylib_for_sonoma.sh
Build raylib 4.5 dylib for macOS Sonoma
#!/bin/bash
FIXED_MINIAUDIO_URL="
https://raw.githubusercontent.com/mackron/miniaudio/fe5f17ecf3189c680855b030467bcfa9f8d26143/miniaudio.h"
curl -L $FIXED_MINIAUDIO_URL -o src/external/miniaudio.h
mkdir -p build
cd build
cmake \
#!/bin/bash
# README: A more updated version is on the comments by (ashmna)[https://gist.github.com/ashmna]
# See at: https://gist.github.com/allangarcia/938b052a7d55d1652052e4259364260b?permalink_comment_id=4265898#gistcomment-4265898
# this is for tools required
brew update
brew install ninja
brew install cmake
src/area.rs
use bevy::{prelude::*, sprite::MaterialMesh2dBundle};
use bevy_rapier2d::prelude::{Collider, RigidBody};
use crate::common::{LEVEL_COLUMNS, LEVEL_ROWS, TILE_SIZE};
pub const WALL_THICKNESS: f32 = 10.0;
#[derive(Debug, Component)]
pub struct AreaWall;
pub fn setup_wall(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
@lumin3000
lumin3000 / 红太狼的平底锅.user.js
Created March 7, 2021 07:09
红太狼的平底锅
// ==UserScript==
// @name 红太狼的平底锅
// @namespace duxiu.ssno.search
// @version 1.0.4
// @include *search*
// @include *bookDetail.jsp?*
// @include *advsearch*
// @include *book.do?go=guide*
// @include *book.do?go=showmorelib*
// @include *searchEBook*
@lumin3000
lumin3000 / osx-setup.sh
Created April 17, 2018 04:48 — forked from somebox/osx-setup.sh
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
@lumin3000
lumin3000 / dropbox-datastores-1.1-latest.js
Created March 29, 2016 14:38
dropbox-datastores-1.1-latest.js
// dropbox-datastores-1.1.0.js
(function(){var t,e,r,n,i,o,s,a,u,l,h,c,d,p,_,f,g,y,m,v,w,b,S,D,E,A,I,O,x,T,U,C,R,k,P,L,N,F,B,z,j,X,M,H,q,V,G,J,W,K,Z,$,Q,Y,te,ee,re={}.hasOwnProperty,ne=[].indexOf||function(t){for(var e=0,r=this.length;r>e;e++)if(e in this&&this[e]===t)return e;return-1},ie=function(t,e){function r(){this.constructor=t}for(var n in e)re.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},oe=[].slice;if(D=function(){function t(){throw new Error("Not implemented. Did you mean to use Dropbox.Client?")}return t}(),D.Util=function(){function t(){}return t}(),D.Http=function(){function t(){}return t}(),D.File=function(){function t(){}return t}(),u="1.1.0","undefined"!=typeof global&&"undefined"!=typeof module&&"exports"in module)c=global,d=module.require.bind(module),module.exports=D;else if("undefined"!=typeof window&&"undefined"!=typeof navigator)c=window,d=null,window.Dropbox&&!function(){var t,e,r,n;r=window.Dropbox,n=[];for(t in r)re.call(r,t)&&(e=
Rails3 - CheatSheet - CommandLine
rails new ApplicationName – Create a new application
rails _3.0.9_ new ApplicationName – Create a new application with a specific version of rails
rails generate/g model ModelName – Creates a model with the specified model_name
rails generate/g controller ControllerName – Creates a controller with the specified controller_name
rails generate/g migration MigrationName – Creates a migration with the specified migration_name
rails generate/g scaffold ModelName ControllerName – A shortcut for creating your controller, model and view files etc.
rails destroy controller ControllerName – Destroys the created controller and its related file.
rails destroy model - Destroys the created model and its related file.
@lumin3000
lumin3000 / gist:5009896
Created February 22, 2013 00:48
一次性删除微博关注页上的整页关注人(http://weibo.com/xxxx/myfollow
a=$$('.myfollow_list');for(var i=0;i<a.length;i++){a[i].click()};
$$('.W_btn_d')[1].click();
setTimeout(function(){$$('.W_btn_d')[$$('.W_btn_d').length-1].click()},1000);
setTimeout(function(){window.location.reload()},2000);
@lumin3000
lumin3000 / gist:3274214
Created August 6, 2012 12:48 — forked from g3d/gist:2709563
Clean Install – Mountain Lion OS X 10.8 DP3