Skip to content

Instantly share code, notes, and snippets.

View tsyber1an's full-sized avatar
🎯
Focusing

Tsyren O. tsyber1an

🎯
Focusing
View GitHub Profile
#step 1 - installation
sudo gem install sparql
#step 2 - test
# in test.rb
require 'sparql/client'
sparql = SPARQL::Client.new("http://dbpedia.org/sparql")
@tsyber1an
tsyber1an / about.md
Created September 2, 2011 20:47 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@tsyber1an
tsyber1an / popup_center_nested_window_html.js
Created January 19, 2012 14:37
popup centered nested window in html
function popupCenter(url, width, height, name) {
var left = (screen.width/2)-(width/2);
var top = (screen.height/2)-(height/2);
return window.open(url, name, "menubar=no,toolbar=no,status=no,width="+width+",height="+height+",toolbar=no,resizable=yes,scrollbars=yes,left="+left+",top="+top);
};
/* Usage by example */
jQuery('.auth_form').submit(function(e){
var $form = jQuery(this);
@tsyber1an
tsyber1an / gist:1730897
Created February 3, 2012 16:12
database.yml
development:
adapter: postgresql
username: studentify
host: 127.0.0.1
port: 5432
password: smarty_pens
database: studentify_development
test:
adapter: postgresql
@tsyber1an
tsyber1an / gist:1761416
Created February 7, 2012 19:34
Validation failed
ActiveRecord::RecordInvalid in SessionsController#new
Validation failed: Photo /tmp/stream20120208-13082-389z2b.txt is not recognized by the 'identify' command., Photo /tmp/stream20120208-13082-389z2b.txt is not recognized by the 'identify' command.
@tsyber1an
tsyber1an / index.html
Created April 2, 2012 07:42
Slider example implementation in SVG
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
svg {
background: #333;
}
@tsyber1an
tsyber1an / index.html
Created April 2, 2012 15:14
Slider example implementation in SVG (issue #1)
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
svg {
background: #333;
}
@tsyber1an
tsyber1an / index.html
Created April 3, 2012 11:07 — forked from enjalot/index.html
Simple Pie Chart example with D3.js
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script>
<style type="text/css">
@tsyber1an
tsyber1an / data.json
Created April 10, 2012 09:07
simple force-directed graph using d3
{
"nodes": [
{
"name": "Myriel",
"group": 1
},
{
"name": "Napoleon",
"group": 1
},
@tsyber1an
tsyber1an / .bash_profile
Created June 15, 2012 12:59
bash profile (git tips for bash)
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# add local bin path
PATH=$HOME/.bin:$PATH
PATH=/usr/local/bin:$PATH
PATH=/usr/local/sbin:$PATH
PATH=/usr/local/mysql/bin:$PATH
# don't put duplicate lines in the history