Skip to content

Instantly share code, notes, and snippets.

View harushimo's full-sized avatar

Hari Vedam harushimo

View GitHub Profile
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda6 during installation
UUID=dbcc2d3e-e912-40dd-926c-9c951a64947f / btrfs defaults,subvol=@ 0 1
# /boot was on /dev/sda1 during installation
UUID=89205bc9-a872-4326-ad67-ecc322a42454 /boot ext4 defaults 0 2
# /home was on /dev/sda7 during installation
UUID=b6c99645-56e4-4e06-942f-b1874dc06bdd /home btrfs defaults,subvol=@home 0 2
# swap was on /dev/sda5 during installation
UUID=460ae475-e401-4920-a58f-f3d9e4f117b4 none swap sw 0 0
This kernel requires an x86-64, but only detected an i686 cpu. Unable to boot-please use a kernel appropriate for your CPU
@harushimo
harushimo / gist:3326309
Created August 11, 2012 18:45
drupal error
( ! ) Fatal error: Call to undefined function field_attach_load() in /usr/share/drupal7/includes/entity.inc on line 320
Call Stack
# Time Memory Function Location
1 0.0001 648312 {main}( ) ../install.php:0
2 0.0005 661136 install_drupal( ) ../install.php:26
3 0.4064 2415952 install_run_tasks( ) ../install.core.inc:79
4 0.7515 3793680 install_run_task( ) ../install.core.inc:342
5 0.7515 3795216 drupal_build_form( ) ../install.core.inc:392
6 1.1591 6234504 drupal_process_form( ) ../form.inc:366
@harushimo
harushimo / gist:4166008
Created November 29, 2012 01:05
binary tree
#!/usr/bin/python
#Building the trees
class Tree(object):
def __init__(self, cargo, left=None, right=None):
self.cargo = cargo
self.left = left
self.right = right
def __str__(self):
@harushimo
harushimo / gist:4210478
Created December 5, 2012 00:02
git error
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# .rspec
@harushimo
harushimo / gist:4226277
Created December 6, 2012 17:23
bash script
#!/bin/bash
#Source and Target
source="$HOME/Downloads"
current_date=`date"+%m_%d_%y"`
target="$HOME/backup/${current_date}_back.tar.gz"
#Creating backup.tgz file to back up directory
tar -cvzf "$target" --exclude="$target" "$source"
Error Message
@harushimo
harushimo / gist:4229960
Created December 7, 2012 01:19
ruby rspec error
F
Failures:
1) StaticPages Home page should have the content 'Sample App'
Failure/Error: visit '/static_pages/home'
NoMethodError:
undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007f84d4d6bef0>
# ./spec/requests/static_pages_spec.rb:9:in `block (3 levels) in <top (required)>'
@harushimo
harushimo / gist:4230470
Created December 7, 2012 03:15
ruby code
require 'spec_helper'
describe "StaticPages" do
describe "Home page" do
it "should have the content 'Sample App'" do
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers
visit '/static_pages/home'
page.should have_content('Sample App')
@harushimo
harushimo / gist:4365970
Last active December 10, 2015 02:09
sample
#!/usr/local/bin/node
//Writing a configuration file
var config = {
"secrets" : {
"clientId" : "GOZ5E3WU0KPGHAU4NDRBDNT2F2BVAP0SGCMZJAQAI4EOOGMT",
"clientSecret": "HLZJO1OEXMPKXVDO23Z4EE3WBHS2ZSBUBU4UWALW2ZSFEFNR",
"redirectUrl": "https://localhost:3000/callback"
}
,"foursquare" : {
#This is using a regular expression to for small letter
while playAgain == '[Yy]es' or playAgain == '[Yy]'
displayIntro()
caveNumber = chooseCave()
checkCave(caveNumber)
print('Do you want to play again? (yes or no)')
playAgain = input()