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
//EnhanceJS isIE test idea | |
//detect IE and version number through injected conditional comments (no UA detect, no need for cond. compilation / jscript check) | |
//version arg is for IE version (optional) | |
//comparison arg supports 'lte', 'gte', etc (optional) | |
function isIE(version, comparison) { | |
var cc = 'IE', | |
b = document.createElement('B'), |
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
//EnhanceJS isIE test idea | |
//detect IE and version number through injected conditional comments (no UA detect, no need for cond. compilation / jscript check) | |
//version arg is for IE version (optional) | |
//comparison arg supports 'lte', 'gte', etc (optional) | |
var isIE = (function(){ | |
var doc = document, |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |
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
template <typename... T> | |
constexpr auto make_array(T&&... values) -> | |
std::array< | |
typename std::decay< | |
typename std::common_type<T...>::type>::type, | |
sizeof...(T)> { | |
return {std::forward<T>(values)...}; | |
} |
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 getpass | |
import os | |
import subprocess | |
import sys | |
############################################################################### | |
# |
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
function addSourceToVideo(element, src, type) { | |
var source = document.createElement('source'); | |
source.src = src; | |
source.type = type; | |
element.appendChild(source); | |
} | |
var video; |
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
function cssLoad(url, callback) { | |
var promise, | |
resolutions = [], | |
rejections = [], | |
resolved = false, | |
rejected = false, | |
count, id; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<style-scheme version="1.0" name="Monokai"> | |
<style name="Text" foreground="#e6e5e2" background="#272822"/> | |
<style name="Link" foreground="#66d9ef"/> | |
<style name="Selection" foreground="#e6e5e2" background="#49483e"/> | |
<style name="LineNumber" foreground="#a0a19c" background="#272822"/> | |
<style name="SearchResult" foreground="#ffffff" background="#2572b8"/> | |
<style name="SearchScope" foreground="#000000" background="#e2efff"/> | |
<style name="Parentheses" foreground="#ff0000" background="#c3e1ff"/> | |
<style name="CurrentLine" background="#3e3d32"/> |
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
QImage readDDSFile(const QString &filename) | |
{ | |
QGLWidget glWidget; | |
glWidget.makeCurrent(); | |
GLuint texture = glWidget.bindTexture(filename); | |
if (!texture) | |
return QImage(); | |
// Determine the size of the DDS image |
OlderNewer