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
yum groupinstall "X Window System" "Desktop" "Desktop Platform" | |
yum install gdm gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts | |
unlink /etc/systemd/system/default.target | |
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target | |
reboot |
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 this as sudo | |
apt-get install g++ | |
apt-get install build-essential | |
apt-get install flex | |
apt-get install libedit2 libedit-dev | |
apt-get install bison | |
apt-get install cmake | |
apt-get install openssl | |
sudo apt-get install libssl-dev | |
apt-get install libqt4-dev |
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
const vec4 lightPosition = vec4(0.0, 1.8, 1.3, 1.0); | |
const vec3 materialAmb = vec3(1.0, 0.0, 0.0); | |
const vec3 materialDif = vec3(1.0, 0.0, 0.0); | |
const vec3 materialSpe = vec3(1.0, 1.0, 1.0); | |
const float shininess = 6.0; | |
const vec3 lightAmb = vec3(0.2, 0.2, 0.2); | |
const vec3 lightDif = vec3(0.7, 0.7, 0.7); | |
const vec3 lightSpe = vec3(1.0, 1.0, 1.0); |
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
precision mediump float; | |
varying vec4 fColor; | |
void main() { | |
// Since all the work is done at the vertex shader, | |
// simply pass along the interpolated color | |
gl_FragColor = fColor; | |
} |
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
precision mediump float; | |
varying vec4 fPosition; | |
void main() { | |
gl_FragColor = abs(fPosition); | |
} |
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
attribute vec4 vPosition; | |
attribute vec4 vNormal; | |
uniform mat4 mProjection; | |
uniform mat4 mModelView; | |
varying vec4 fPosition; | |
void main(){ | |
fPosition = vPosition; | |
gl_Position = mProjection * mModelView * (vPosition + 0.2 * vNormal); | |
} |
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
--https://mightybyte.github.io/monad-challenges/pages/ex1-4.html | |
type Gen a = Seed -> (a, Seed) | |
randPair :: Gen (Char, Integer) | |
randPair seed = | |
let (c, s0) = randLetter seed in | |
let (i, s1) = rand s0 in | |
((c, i), s1) |
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
def console_loader(): | |
import time | |
import sys | |
for i in range(100): | |
sys.stdout.write('\r{}'.format(i)) | |
sys.stdout.flush() | |
time.sleep(0.5) |
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
def hash(v, size): | |
return abs(v) % size | |
def simple_zero_sum(arr): | |
_hash = lambda v: abs(v) % len(arr) | |
changes = 1 | |
while changes > 0: | |
changes = 0 | |
for idx, value in enumerate(arr): |
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
# Colors (Monokai Pro) | |
colors: | |
# Default colors | |
primary: | |
background: '#2D2A2E' | |
foreground: '#FCFCFA' | |
# Normal colors | |
normal: | |
black: '#403E41' |
OlderNewer