Skip to content

Instantly share code, notes, and snippets.

View sharavsambuu's full-sized avatar
🐌

sharavsambuu sharavsambuu

🐌
View GitHub Profile
@sharavsambuu
sharavsambuu / texture mapping
Created November 25, 2013 03:58
texture mapping using followings : GLEW, GLFW, SOIL, OPENGL
#define GLEW_STATIC
#include "GL/glew.h"
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/constants.hpp>
#include <SOIL.h>
#include <iostream>
#include <string>
@sharavsambuu
sharavsambuu / gist:7671924
Last active December 29, 2015 12:39
blinn-phong reference
GLint uloc_MV, uloc_P, uloc_texDiff, uloc_texNorm, uloc_texSpec, uloc_lightPos, uloc_lightDir, uloc_lightDiff, uloc_lightSpec, uloc_amb, uloc_viewDir;
void GLdummyShaders() {
const GLchar* vertsrc = "#version 150 core\n"
"in vec3 inPos;\n"
"in vec2 inTexCoord;\n"
"out vec3 pos;\n"
"out vec2 texCoord;\n"
"uniform mat3 MV;\n"
"uniform mat4 P;\n"
"void main() {\n"
@sharavsambuu
sharavsambuu / mp3.js
Created February 24, 2014 07:07 — forked from dtrce/mp3.js
var http = require('http'),
fileSystem = require('fs'),
path = require('path')
util = require('util');
http.createServer(function(request, response) {
var filePath = 'path_to_file.mp3';
var stat = fileSystem.statSync(filePath);
response.writeHead(200, {
@sharavsambuu
sharavsambuu / ember-hello-world.html
Last active August 29, 2015 14:04
EmberJS hello world
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Simple Ember Hello World for Bek" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script>
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script>
<meta charset="utf-8">
<title>Ember Demo for Bek</title>
</head>
@sharavsambuu
sharavsambuu / app.js
Last active August 29, 2015 14:04
Ember Hello World plus Handlebar loading
App = Ember.Application.create({
ready: function() {
Em.$.ajax({
url: 'https://dl.dropboxusercontent.com/u/3482121/temp/news.hbs',
async:false,
success: function(res) {
Em.TEMPLATES['news'] = Ember.Handlebars.compile(res);
}
});
Em.$.ajax({
(function (window, document, $, undefined) {
var possibleCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var defaults = {
selector: "#captcha",
text: null,
randomText: true,
randomColours: true,

Migrate

$ ./node_modules/.bin/knex:migrate:latest -c db/config.js

SSL upgrades on rubygems.org and RubyInstaller versions

Hello,

If you reached this page, means you've hit this SSL error when trying to pull updates from RubyGems:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

This error is produced by changes in rubygems.org infrastructure, please