Skip to content

Instantly share code, notes, and snippets.

View phraniiac's full-sized avatar
🎯
Focusing

Pranav Sharma phraniiac

🎯
Focusing
View GitHub Profile
@phraniiac
phraniiac / .vimrc
Last active January 17, 2016 07:17
My vimrc file
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
nmap <silent> <C-S> :vsplit<CR>
:syntax on
:set ruler number ignorecase autoindent expandtab tabstop=4 showcmd incsearch nowrap nobackup noerrorbells shortmess+=A guifont=Monospace\ 10 :q
syn on
syntax enable
set background=dark
int strsize;
char str[10000];
void input()
{
strsize = 1;
char c = getchar();
while(('a' > c) || (c > 'z'))
c = getchar();
str[0] = c;
def test_toolaccess_before_subproject(self):
self.app.extra_environ = {'username': 'test-admin'}
# Add the subproject with a wiki.
self.app.post('/p/test/admin/update_mounts', params={
'new.install': 'install',
'new.ep_name': '',
'new.ordinal': '1',
'new.mount_point': 'test-mount',
'new.mount_label': 'Test Mount'})
r = self.app.get('/p/test/test-mount/')
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@phraniiac
phraniiac / changes.patch
Last active April 27, 2016 14:13
#7949 Ticket
def paged_diffs(self, commit_id, start=0, end=None):
result = {'added': [], 'removed': [], 'changed': [], 'copied': [], 'renamed': []}
cmd_args = ['--no-commit-id',
'--name-status',
'--no-abbrev',
'--root',
# show only the files that are changed in the repository.)
'-r',
'-z' # don't escape filenames and use \x00 as fields delimiter
]
class TestUIController(TestController):
def setUp(self):
super(TestUIController, self).setUp()
self.setup_with_tools()
@with_git
def setup_with_tools(self):
h.set_context('test', 'src-git', neighborhood='Projects')
repo_dir = pkg_resources.resource_filename('forgegit', 'tests/data')
c.app.repo.fs_path = repo_dir
commit da6ee3b541166af46c039d88dd401578f562b774
Author: dastanforever <pranav.sharma.nits@gmail.com>
Date: Wed Jan 3 18:00:31 2016 +0530
[#7949] File listing in commites changed. Tests added.
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 3fc26dd..2f67783 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
var myDivElement = <div className="foo" />;
ReactDOM.render(myDivElement, document.getElementById('example'));
// Here the 'example' is any(div,span or else) html element in the html code.
var MyComponent = React.createClass({
/* all the functionalities to be defined. */
someProperty = false;
});
// Treat it like a standard html tag now.
var myElement = <MyComponent someProperty={true} />
ReactDOM.render(myElement, document.getElementById('example'));