Skip to content

Instantly share code, notes, and snippets.

View harushimo's full-sized avatar

Hari Vedam harushimo

View GitHub Profile
git push origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7728 100 7728 0 0 31286 0 --:--:-- --:--:-- --:--:-- 31414
=> Downloading nvm from git to '/home/hari/.nvm'
=> Cloning into '/home/hari/.nvm'...
remote: Counting objects: 3910, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 3910 (delta 9), reused 0 (delta 0), pack-reused 3887
Receiving objects: 100% (3910/3910), 970.64 KiB | 1.32 MiB/s, done.
# <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')