$ git add <filename>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
# Extracts and load PSX games that are distributed in .7z / .ape format. | |
# Requires : ffmpeg, perl, cdemu, ecm2bin | |
GAME_FOLDER="$1" | |
EXTRACT_FOLDER=/tmp/game | |
rm -rf "$EXTRACT_FOLDER" | |
mkdir "$EXTRACT_FOLDER" | |
cp -rf "$GAME_FOLDER"/* "$EXTRACT_FOLDER" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import re | |
command = ['qdbus', 'org.kde.plasmashell', '/PlasmaShell', 'org.kde.PlasmaShell.evaluateScript'] | |
command.append(""" | |
var allDesktops = desktops(); | |
for (i=0;i<allDesktops.length;i++) | |
{ | |
d = allDesktops[i]; | |
d.wallpaperPlugin = "org.kde.image"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# !!WARNING!! | |
# This will DELETE all efforts you have put into configuring nix | |
# Have a look through everything that gets deleted / copied over | |
nix-env -e '.*' | |
rm -rf $HOME/.nix-* | |
rm -rf $HOME/.config/nixpkgs |
Saved for my personal reference, all content belongs to codetheory.in
Limiting the frame rate while using requestAnimationFrame
can be a common want especially when coding Games where you want your animations and mechanics to not exceed a particular mark of frames per second. Let’s go through 2 ways of doing it.
Using setTimeout
inside the rAF method is an easy way.