Skip to content

Instantly share code, notes, and snippets.

View thexodus's full-sized avatar

Ashis Rai thexodus

  • Kathmandu, Nepal
View GitHub Profile
@thexodus
thexodus / bundle.app.js
Created July 9, 2018 05:43
webpack output after nyc code coverage integration.
webpackJsonp([0],[
/* 0 */,
/* 1 */,
/* 2 */,
/* 3 */,
/* 4 */,
/* 5 */,
/* 6 */,
/* 7 */,
/* 8 */
@thexodus
thexodus / lensphere.html
Created December 21, 2016 16:36
lensphere tumblr theme
<html>
<head>
<title>{Title}</title>
<link rel="shortcut icon" href="{Favicon}">
<link rel="alternate" type="application/rss+xml" href="{RSS}">
{block:Description}
<meta name="description" content="{MetaDescription}" />
{/block:Description}
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Bad+Script|Unica+One|Economica|Great+Vibes');
@thexodus
thexodus / file compressor
Last active August 29, 2015 14:15
file minifier and zipper with node (css and javascript)
var fs = require('fs')
var zlib = require('zlib')
var gzip = zlib.createGzip();
var compressor = require(process.env['HOME'] + '/node_modules/node-minify');
new compressor.minify({
type: 'gcc',
fileIn: 'js/main.js',
fileOut: 'js/main.min.js',
callback: function(err, min){
/**
* Play and Pause buttons
*/
body {
background: black;
}
#play, #pause, #fwd, #rew {
width:80px;
height: 80px;
@thexodus
thexodus / wildcard-search
Last active December 18, 2015 19:29
array wildcard search
@thexodus
thexodus / UserMailer.rb
Created October 3, 2012 08:30 — forked from willywg/UserMailer.rb
Mass password reset and email notification for Devise 1.4.2 with Rails 3.x
# Send password reset notification
# path: app/mailers/user_mailer.rb
class UserMailer < ActionMailer::Base
default :from => "no-reply@example.com"
def password_reset(user, password)
@user = user
@password = password
mail(:to => user.email,
:subject => 'Password Reset Notification')
@thexodus
thexodus / coffeescript_bundle_for_sublime.sh
Created September 27, 2012 05:50 — forked from zeke/coffeescript_bundle_for_sublime.sh
Install the CoffeeScript TextMate bundle in Sublime Text 2
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/CoffeeScript
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/CoffeeScript
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Syntaxes/CoffeeScript.tmLanguage
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Preferences/CoffeeScript.tmPreferences
@thexodus
thexodus / fixes.md
Created August 9, 2012 11:27 — forked from zoras/fixes.md
Getting rid of nokogiri segfaults

This readme is a mixture of everything I read on SO+nokogiri wiki, which ultimately worked out for me.

Here are the steps which worked for me to get rid of segfaults with Nokogiri 1.4.4, on both Lion and Snow Leopard, with Ruby 1.8.7 (patchlevel 334 and +).

First diagnose which version of libxml2 you're using:

bundle exec nokogiri -v

If you have 2.7.3 listed somewhere, you're in bad waters (known to segfault). Install libxml2, libiconv, and libxslt after removing along with nokogiri:

@thexodus
thexodus / rvm.sh
Created July 19, 2012 18:07
/etc/profile.d/rvm.sh
#
# RVM profile
#
# /etc/profile.d/rvm.sh # sh extension required for loading.
#
if [ -n "${BASH_VERSION:-}" -o -n "${ZSH_VERSION:-}" ] ; then
# Load user rvmrc configurations, if exist
for file in /etc/rvmrc "$HOME/.rvmrc" ; do
[[ -s "$file" ]] && source $file