Skip to content

Instantly share code, notes, and snippets.

View atirut-w's full-sized avatar
💭
wawawawawawawa

Atirut Wattanamongkol atirut-w

💭
wawawawawawawa
View GitHub Profile
@atirut-w
atirut-w / Makefile
Last active September 15, 2021 04:33
GNOME Builder Makefile for LOVE2D games
PROJECT_NAME = love2d_game
SOURCE_DIR = src
BUILD_DIR = build
LOVE_PATH = $(shell which love)
build: $(SOURCE_DIR)
@mkdir -p $(BUILD_DIR)
@cd $(SOURCE_DIR) && zip -9 -FSr ../$(BUILD_DIR)/game_data.zip . > /dev/null
@cd $(BUILD_DIR) && cat $(LOVE_PATH) game_data.zip > $(PROJECT_NAME) && chmod a+x $(PROJECT_NAME)
@atirut-w
atirut-w / Makefile
Created September 12, 2021 04:22
Boilerplate GNOME Builder Makefile
# Boilerplate Makefile for GNOME Builder.
#
# Please note that if you run your project after making changes without manually rebuilding it, GNOME Builder will do it for you.
#
# The install target seem to only be executed when you run your project for the first time after opening it.
build:
clean:
function math.average(t)
local sum = 0
for _,v in pairs(t) do -- Get the sum of all numbers in t
sum = sum + v
end
return sum / #t
end
base64 -d <<<"IF9fX18gICAgICAgICAgICAgICBfXyAgX19fXwovXCAgX2BcICAgICAgICAgICAgL1wgXC9cICBfYFwKXCBcIFwvXCBcICAgICBfXyAgIFxfXCBcIFwsXExcX1wgICAgIF9fICAgIF9fXwogXCBcIFwgXCBcICAvJ19fYFwgLydfYCBcL19cX18gXCAgIC8nX19gXCAvJ19fX1wgCiAgXCBcIFxfXCBcL1wgIF9fLy9cIFxMXCBcL1wgXExcIFwvXCAgX18vL1wgXF9fLyAKICAgXCBcX19fXy9cIFxfX19fXCBcX19fLF9cIGBcX19fX1wgXF9fX19cIFxfX19fXAogICAgXC9fX18vICBcL19fX18vXC9fXyxfIC9cL19fX19fL1wvX19fXy9cL19fX18vCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICBDIHkgYiBlIHIgVCBlIGEgbSAgVCBI"
echo ''
#!/usr/bin/env bash
if [[ -z "$1" && -z "$2" ]]; then
echo "PlayMIDI version 1.0
Use fluidsynth to play MIDI musics easily in one command
Usage:
playmidi soundfont.sf2 midifile.mid"
exit 1
elif [[ $1==*".mid" && -z "$2" ]]; then
fluidsynth -g 0.8 -a alsa -m alsa_seq -l -i "$1"
#!/usr/bin/perl
#
# Tool: Imad'Ox Bruter
# Author: Imad'Ox Hunter
# Contact: imadelouajib@gmail.com
# Code date: 17 April 2013
#
#
# Description:
# Imad'Ox Cracker is a password cracking tool written in perl to perform a dictionary-based attack on a specific Facebook user through HTTPS.
#!/bin/bash
#An APT utility script
#Pretty much all in one. update repos, upgrade packages, autoremove, you name it
#First update to this program:
# +Added ability to add or remove software repository
# +Utilize ppa-purge to remove software repository
# +Some more features
#My banner made using figlet
#!/bin/bash
#This is a simple script that will give you a summary of your system
#You can use this to make your own software or a piece of code but pls credit me
#if you're going to publish it
#
#Made by Wattana Gaming
#Sample code by Tecmint.com
#Color sheet
white='\033[0m'
io.write("Do yu no da wae?: ")
wae = io.read()
if wae == "yes" then
print("Yu do not no da wae!")
elseif wae == "no" then
print("Yu ar sucks")
end