Skip to content

Instantly share code, notes, and snippets.

@antonvolkoff
antonvolkoff / gist:5317206
Created April 5, 2013 07:02
Prints href attributes from given page.
(ns zenbot.core
(:gen-class)
(:require [clj-http.client :as client])
(:require [net.cgrand.enlive-html :as html]))
(defn fetch-url-body
"Fetches given address and returns it's body."
[address]
(:body (client/get address)))
<script type="text/javascript">
var DOMReady = function(a,b,c){b=document,c='addEventListener';b[c]?b[c]('DOMContentLoaded',a):window.attachEvent('onload',a)};
var nextUrl = function () {
return "<%= ibounty_url('approve_push') %>";
};
DOMReady(function () {
var repeat = function() {
setTimeout(function() {
window.location.href = nextUrl();
Based on feedback from ChemicalR I'm cross posting all the things I've bookmarked in reguards to planet rendering here in the code forums.
[url=http://www.gamasutra.com/view/feature/3098/a_realtime_procedural_universe_.php]Sean O'Neil[/url]'s 4 2001 part series is considered a foundation for realistic large scale (planets on up) rendering. Most of these methods are now obsolete and replaced with faster methods and gpu shaders. His [url=http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html]atmospheric scattering[/url]method is still used often due to its relative simplicity, but it only produces earth atmospheres.
[url=http://acko.net/blog/making-worlds-1-of-spheres-and-cubes/]Steven Wittens[/url] 2009 multipart series is frequently linked to as I've searched for best practices in creating planets using modern methods. It is based on a cube with mesh texture and normalizes the vertex points into a sphere. The advantage to this method is that conventional terrain LOD methods, often used in first
@antonvolkoff
antonvolkoff / True Trello Printer
Created November 29, 2016 15:43 — forked from mathiasrw/True Trello Printer
Ever wanted to print your Trello board? Export as JSON and paste it into the code.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>True Trello Printer</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<style>
body{margin:15%;}
.panel-body{
0x4737C38880A57d49Cdb7570aAd9D2D41d344F159
@antonvolkoff
antonvolkoff / setup.md
Last active January 16, 2018 12:48 — forked from shashankmehta/setup.md
Setup PHP 5.1 and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.1.+ brew install php71 --with-postgresql
  • Install mcrypt: brew install mcrypt php71-mcrypt
  • Finally, install composer: brew install composer
@antonvolkoff
antonvolkoff / freeze_class.rb
Created December 15, 2019 15:10
You can freeze classes in ruby
class Point
attr_reader :x, :y
def initialize(x, y)
@x = x
@y = y
freeze
end
def move!(x_offset, y_offset)
@antonvolkoff
antonvolkoff / rule.ts
Created January 19, 2020 14:35
Rules for switchboard
class Rule {
private operations: Array<any>;
constructor() {
this.operations = [];
}
filter(options): Rule {
this.operations.push({ action: 'filter', options });
return this;
@antonvolkoff
antonvolkoff / function.js
Last active February 9, 2020 14:26
Serverless hello
console.log("Hello! v4")
@antonvolkoff
antonvolkoff / shit_grouper.rb
Created February 14, 2020 12:41
Grouping by year
module ShitGrouper
def self.group(array)
array.group_by(&:year)
end
def self.ungroup(hash)
hash.values.flatten
end
end