Skip to content

Instantly share code, notes, and snippets.

View raminfp's full-sized avatar
✔️
Verified

Ramin Farajpour Cami raminfp

✔️
Verified
View GitHub Profile
Problem Code Here :
redirect_to = request.GET.get('next')
return HttpResponseRedirect(redirect_to)
Resolve Bug :
redirect_to = request.GET.get('next')
if redirect_to:
redirect_to = redirect_to if is_safe_url(redirect_to, request.get_host()) else '/'
@raminfp
raminfp / code_django.py
Last active August 24, 2016 05:45
code.django
Hi Tim
action 1 : https://code.djangoproject.com/github/login
https://github.com/trac-hacks/trac-github/blob/master/tracext/github.py#L64&L69
def _do_login(self, req):
oauth = self._oauth_session(req)
@raminfp
raminfp / addition.asm
Created January 8, 2017 00:34 — forked from sanjibnarzary/addition.asm
Adding Two Numbers and Display the Content of Register in Assembly Language using nasm
;Author : Sanjib Narzary
;Institute: NIT Calicut
;Email: o-._.-o@live.com
;Assembly Code
section .text
global main
extern printf
main:
@raminfp
raminfp / loop.asm
Created January 8, 2017 00:34 — forked from sanjibnarzary/loop.asm
Lets count 10 to 0 in Assembly Language (Assenbly Language program to loop 10 times)
;Author : Sanjib Narzary
;Institute: NIT Calicut
;Email: o-._.-o@live.com
;Assembly Code
section .text
global main
extern printf
main:
mov ebx,10 ;number 10 to ebx
@raminfp
raminfp / cio.asm
Created January 8, 2017 00:34 — forked from sanjibnarzary/cio.asm
Character Input Output in ASM using NASM in UBUNTU Linux
;Author : Sanjib Narzary
;Institute: NIT Calicut
;Email: o-._.-o@live.com
;Assembly Code
section .data
;New line string
NEWLINE: db 0xa, 0xd
LENGTH: equ $-NEWLINE
section .bss
INPT: resd 1
@raminfp
raminfp / greet.asm
Created January 8, 2017 00:34 — forked from sanjibnarzary/greet.asm
Prompt a User to type his name and Gree Him on the Console, Assembly Language Code
;Author : Sanjib Narzary
;Institute: NIT Calicut
;Email: o-._.-o@live.com
;greet.asm
section .data
; Declare/store the information "Hello World!"
prompt db 'What is your name? '
; do not change the order of the following three lines!
helloMsg dq 'Hello '
name db ' ' ; space characters
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license
@raminfp
raminfp / resources.md
Created February 26, 2017 01:29 — forked from fffaraz/resources.md
CS 306 - Linux/UNIX Programming
@raminfp
raminfp / atomic.h
Created March 19, 2017 05:18 — forked from aperezdc/atomic.h
Replacement for the Linux kernel asm/atomic.h header using GCC built-ins
#ifndef _ATOMIC_H
#define _ATOMIC_H
/* Check GCC version, just to be safe */
#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC_MINOR__ < 1)
# error atomic.h works only with GCC newer than version 4.1
#endif /* GNUC >= 4.1 */
/**
@raminfp
raminfp / debugging_kernel.txt
Created June 4, 2017 11:04 — forked from hngouveia01/debugging_kernel.txt
Debugging kernel code line by line with Qemu and GDB
We are going to use buildroot to download, configure and compile the kernel.
First, download and uncompress buildroot: https://buildroot.org/download.html
Go to the directory and:
make qemu_x86_defconfig
make menuconfig