Skip to content

Instantly share code, notes, and snippets.

@domitry
domitry / hoge.sh
Last active August 29, 2015 14:24
ruby -e "(lambda{|r| Dir::entries(r).select{|s| s.match(/(.+).cpp/)}.each{|n| File.join(root, name).tap{|path| File.write(path, open(path).read.gsub('old_name', 'new_name'))}}}).call('path_to_parent_directory')"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
alert("Hello, world!");
@domitry
domitry / init.el
Created October 5, 2015 05:07
hogehoge
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
(require 'auto-complete)
(global-auto-complete-mode t)
#include <stdio.h>
#include <math.h>
#include <GL/glut.h>
#define PI 3.14159265
#define WD 64
#define HT 64
#define THR 25
/***********************************************:::
@domitry
domitry / ex66.c
Last active November 2, 2015 16:47
#include <stdio.h>
#include <math.h>
#include <GL/glut.h>
#define PI 3.14159265
#define WD 256
#define HT 256
#define REV 1.0
#define NON_REV -1.0
#define init_mat(mat, w, h) mat.width=w; mat.height=h
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include "image.h"
#define PI 3.1415926
#define P(x,y) x+y*WD
void dft(double *A, double *re, double *im){
var obj={a: 2, b: 3};
function get(key){
if(Array.isArray(key))return key.map(get);
return obj[key];
}

Scatter: Nyaplotjs v2

Line: Nyaplotjs v2