Skip to content

Instantly share code, notes, and snippets.

View ardian's full-sized avatar
💭
I may be slow to respond.

Ardian Haxha ardian

💭
I may be slow to respond.
View GitHub Profile
require 'feedzirra'
class TestfeedsController < ApplicationController
def index
feed_urls = ["http://feeds.feedburner.com/PaulDixExplainsNothing"]
feeds = Feedzirra::Feed.fetch_and_parse(feed_urls)
@entry = feeds.entries
end
end
require 'mechanize'
mechanize = Mechanize.new
page = mechanize.get('https://www.google.com/')
form = page.forms.first
form['q'] = 'taekwondo'
@ardian
ardian / mail.rb
Created December 8, 2014 23:23
Ruby code to send email
require 'mail'
options = { :address => "smtp.gmail.com",
:port => 587,
:domain => 'gmail.com',
:user_name => '[email protected]',
:password => 'password',
:authentication => 'plain',
:enable_starttls_auto => true }
source 'https://rubygems.org'
gem 'rails', '4.2.2'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
var http = require('http');
http.createServer(function (req, res){
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
})
.listen(8080, '127.0.0.1');
console.log('Server running at http://127.0.0.1:8080')
@ardian
ardian / gist:7cfd2222813374152c3e1756abeac4e3
Created June 30, 2016 23:56 — forked from paulallies/gist:0052fab554b14bbfa3ef
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.58
Comment: https://keybase.io/crypto
wcFMA9yWuZ0V/hQZAQ//ULMPcPDZQDz/McXlg4G12EG2wsVNOnxRwKj9oYr9GPxu
vySarxN5mRNzjZNujzm9UC/R7WgGe1mle18hCnkRONDLhP7ARqthyvnTabwyS37O
HAkmo9PueRiEj7/s3dU33yigahzH2f59dEGA4xBf8YM/tRz740z+iKBXy80Qxb/p
w6gWt/yHqcQERoGUruo663L/yYSudL5dnEINVuxWigK4ns+v6btYdXpDgHqX0s19
BAEIRXNP9WELEgS/KLT96Y6VQTKkv4Dha/puRPOnJkDaFiL6mfAoiQ1x7NN5fGhI
L444m8uQQifF7F10TIwgoQMyumVob0itOVfM8pHLA0oJ0w+75u29N90tIYtfiLvK

Keybase proof

I hereby claim:

  • I am ardian on github.
  • I am ardian (https://keybase.io/ardian) on keybase.
  • I have a public key ASB504i7qCqJ6RyeeCE4TEBAoZuMRwBuhqAkVid9-p9SVwo

To claim this, I am signing this object:

@ardian
ardian / Monaco for Powerline.otf
Created October 31, 2016 02:28 — forked from baopham/Monaco for Powerline.otf
Patched font Monaco for OSX Vim-Powerline
virtualenv -p /usr/bin/python3 yourenv
source yourenv/bin/activate
pip install package-name