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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
background-color: #ffffff; | |
margin: 0; | |
overflow: hidden; |
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/env python | |
import os | |
import sys | |
import random | |
import json | |
import uuid | |
from PyQt4 import Qt, QtGui, QtCore | |
from spritemapper_ui import Ui_Dialog |
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
; compiling on x86-64 | |
; nasm -f elf64 hello.asm -o hello.o | |
; ld -s -o hello hello.o | |
section .text | |
global _start | |
_start: | |
mov eax,4 ; system call ID: sys_write | |
mov ebx,1 ; file descriptor for standard output |
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
# install build dependencies | |
sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel | |
# clone and install rbenv environment | |
cd ~ | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile |
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
# backup current localtime | |
mv /etc/localtime /etc/localtime.bak | |
# set link to current timezone (e.g. Asia/Manila) | |
ln -s /usr/share/zoneinfo/[timezone] /etc/localtime |
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
# comment out the following lines on /etc/named.conf | |
listen-on-v6 port 53 { ::1; }; | |
# and edit the following files /etc/sysconfig/named and add | |
OPTIONS="-4" |
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
# stops checking the working tree file for possible modification | |
git update-index --assume-unchanged [filename] | |
# does the opposite of the above (starts checking) | |
git update-index --no-assume-unchanged [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
# here is the code to convert img to vdi format | |
# it is useful especially for uefi based image | |
VBoxManage convertfromraw --format VDI [filename].img [filename].vdi |
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
# run `diskpart` command | |
# inside diskpart type the commands | |
# this commands create 16GB of virtual hard disk | |
create vdisk file="file.vhd" maximum=16000 | |
# attach the vdisk and create partition | |
attach vdisk | |
create partition primary |
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
# create a file named compile.bat in the **root** directory of the glew build director | |
# it will create files .a and .dll in lib directory | |
gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.o -c src/glew.c | |
gcc -shared -Wl,-soname,libglew32.dll -Wl,--out-implib,lib/libglew32.dll.a -o lib/glew32.dll src/glew.o -L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32 | |
ar cr lib/libglew32.a src/glew.o | |
gcc -DGLEW_NO_GLU -DGLEW_MX -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.mx.o -c src/glew.c | |
gcc -shared -Wl,-soname,libglew32mx.dll -Wl,--out-implib,lib/libglew32mx.dll.a -o lib/glew32mx.dll src/glew.mx.o -L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32 | |
ar cr lib/libglew32mx.a src/glew.mx.o |