Skip to content

Instantly share code, notes, and snippets.

@psema4
psema4 / slackpost
Created February 4, 2017 21:48 — forked from dopiaza/slackpost
Post a message to a Slack channel
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1
@psema4
psema4 / handy-gamedev-tuts-1.txt
Last active July 30, 2023 09:35
Handy Gamedev Tutorials
Concept Art
===========
Design Cinema
EP 28 - Vehicle Sketching Part 01
https://www.youtube.com/watch?v=iRON7yGuiEI&index=79&list=PLvNv1kRvuSwLYS2CkHTDS6-zVKSoUYzJO
EP 33 - Mech Design Part 01
https://www.youtube.com/watch?v=oSVFil_2TV0&list=PLvNv1kRvuSwLYS2CkHTDS6-zVKSoUYzJO&index=69
@psema4
psema4 / tmux_cheatsheet.markdown
Created November 22, 2016 19:21 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@psema4
psema4 / CameraTimeSharing.cs
Created September 8, 2016 05:05
Useful strategy to manage "unlimited" cameras in Unity 3D
// Source: Archimagus on "Most efficient way to incorporate CCTV screens in Unity?"
// https://www.reddit.com/r/Unity3D/comments/2z7u4c/most_efficient_way_to_incorporate_cctv_screens_in/cpgql85
Camera[] _securityCameras;
void Start()
{
foreach(var s in _securityCameras)
{
s.enabled = false;
}
@psema4
psema4 / TerrainGenerator.cs
Created September 1, 2016 03:59 — forked from Coac/TerrainGenerator.cs
A basic procedural terrain generation make in Unity3D
using UnityEngine;
using System.Collections;
public class TerrainGenerator : MonoBehaviour {
public Texture2D grassTexture;
public Texture2D rockTexture;
void Start()
@psema4
psema4 / readme.md
Created July 23, 2016 18:17 — forked from xem/readme.md
Maths & trigonometry cheat sheet for 2D & 3D games

Conventions

  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;

@psema4
psema4 / example.md
Created July 7, 2016 00:35 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>
@psema4
psema4 / ep_app.js
Created June 16, 2016 16:13 — forked from focusaurus/ep_app.js
Example of how a main express app can mount sub-applications on a mount point with app.use('/mount-point', subapp); If you GET /, you'll see the main_app's '/' response. If you GET /ep_app, you'll see the ep_app's '/' response.
var express = require("express");
var app = express();
app.get('/', function (req, res) {
res.send("This is the '/' route in ep_app");
});
module.exports = app;
@psema4
psema4 / slim-container-examples.php
Created May 12, 2016 03:07 — forked from akrabat/slim-container-examples.php
Example uses of Slim 3's container
<?php
// All file paths relative to root
chdir(dirname(__DIR__));
require "vendor/autoload.php";
$settings = ['foo' => 'FOO', 'bar' => 'BAR'];
$app = new \Slim\App($settings);
// Set some things into the container
@psema4
psema4 / which-assume-unchanged.sh
Created February 8, 2016 02:31
Which files in a git repo are set to assume-unchanged?
#!/bin/bash
# source: http://archive.robwilkerson.org/2010/03/02/git-tip-ignore-changes-to-tracked-files/
git ls-files -v | grep -e "^[hsmrck]"