Skip to content

Instantly share code, notes, and snippets.

View ignisf's full-sized avatar
😈

Petko Bordjukov ignisf

😈
View GitHub Profile
((markdown-mode
(mode . auto-fill)
(fill-column . 80)))
(add-hook 'markdown-mode-hook 'auto-fill-mode)
@ignisf
ignisf / barycentric.rb
Created November 21, 2013 01:14
Lagrange interpolation w/ Barycentric formula
class Barycentric
attr_reader :x, :y
def initialize(samples)
@x = samples.map(&:first).map(&:to_r)
@y = samples.map(&:last).map(&:to_r)
@w = @x.each_index.map { |j| w(j) }
end
def L(x)
@ignisf
ignisf / gist:6250086
Created August 16, 2013 13:43
Change committer name and e-mail
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "original_commiter" ];
then
GIT_COMMITTER_NAME="New Committer";
GIT_AUTHOR_NAME="New Committer";
GIT_COMMITTER_EMAIL="new@email.com";
GIT_AUTHOR_EMAIL="new.email.com";
git commit-tree "$@";
else
git commit-tree "$@";
@ignisf
ignisf / routerstation.diff
Created July 1, 2013 00:22
ROUTERSTATION FreeBSD config patches
Index: sys/mips/conf/AR71XX_BASE
===================================================================
--- sys/mips/conf/AR71XX_BASE (revision 252430)
+++ sys/mips/conf/AR71XX_BASE (working copy)
@@ -24,7 +24,7 @@
# Build these as modules so small platform builds will have the
# modules already built.
-makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci"
+# makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci"
var pageMod = require('sdk/page-mod');
var {data} = require('sdk/self');
sites = [/http:\/\/www\.dnevnik\.bg.*/,
/http:\/\/www\.capital\.bg.*/,
/http:\/\offnews\.bg.*/];
scripts = ['noCommentBG.js',
'dnevnik.js',
'capital.js',
# -*- coding: utf-8 -*-
require 'tweetstream'
require 'ap'
TweetStream.configure do |config|
config.consumer_key = 'a'
config.consumer_secret = 'b'
config.oauth_token = 'c'
config.oauth_token_secret = 'd'
config.auth_method = :oauth
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\widowpenalty=10000
\vfuzz \hfuzz
\raggedbottom
@ignisf
ignisf / gist:5653433
Created May 26, 2013 17:30
Raspbian Wheezy Hard-float (on the Raspberry Pi)
{"DESTDIR"=>"",
"MAJOR"=>"1",
"MINOR"=>"9",
"TEENY"=>"1",
"PATCHLEVEL"=>"374",
"INSTALL"=>"/usr/bin/install -c",
"prefix"=>"/home/pi/.rvm/rubies/ruby-1.9.3-p374",
"EXEEXT"=>"",
"ruby_install_name"=>"ruby",
"RUBY_INSTALL_NAME"=>"ruby",
@ignisf
ignisf / gist:5652404
Created May 26, 2013 10:45
Linaro on the CubieBoard
{"DESTDIR"=>"",
"MAJOR"=>"1",
"MINOR"=>"9",
"TEENY"=>"1",
"PATCHLEVEL"=>"0",
"INSTALL"=>"/usr/bin/install -c",
"EXEEXT"=>"",
"prefix"=>"/usr",
"ruby_install_name"=>"ruby1.9.1",
"RUBY_INSTALL_NAME"=>"ruby1.9.1",