Skip to content

Instantly share code, notes, and snippets.

@eirworks
eirworks / seed.php
Created December 7, 2011 07:02
A FuelPHP task example for seeding like in the Rails.
<?php
#seeding data
namespace Fuel\Tasks;
class Seed
{
public static function run()
{
$projects = array("Example Project Title"=>"Example Project description that descripting nothing...",
@eirworks
eirworks / user.rb
Created December 8, 2011 08:02
Workaround in Twitter Omniauth using Omniauth v1+ (Rails)
# In new Twitter Omniauth, you may encounter errors, first, please check the Omniauth env
auth = request.env["rack.auth"] #this is incorrect
auth = request.env["omniauth.auth"] #this is correct
# Another error I found is: 401 Unauthorized
# which is can be fixed in ROOT/config/initializer/omniauth.rb
# This is incorrect
@eirworks
eirworks / index.haml
Created December 11, 2011 13:30
Haml example in Indonesian language
!!! 5
%html
%head
%title Judul Halaman
%link{:rel => 'stylesheet', :href => 'style.css'}
%body
%h1 Heading 1
%p
Ini adalah paragraf
@eirworks
eirworks / index.html
Created February 14, 2012 15:36
template
<html>
<head>
<title></title>
<style type="text/css">
</style>
</head>
<body>
<div class="colmenu">
<nav>
@eirworks
eirworks / 4chan.rb
Last active October 12, 2015 04:48
4chan images downloader
#!/usr/bin/env ruby
# Beta 1
# This script is wget wrapper to automate downloading
# all images in a 4chan thread
# Only tested and work on linux (since it using its wget)
# Requirements:
# Nokogiri gem installed