Skip to content

Instantly share code, notes, and snippets.

View Sanyambansal76's full-sized avatar
🎯
Focusing

Sanyam Bansal Sanyambansal76

🎯
Focusing
View GitHub Profile
{
u'title': {
u'title': u'SPORT NEWS IN BRIEF'
},
u'modelVersion': u'1',
u'apiUrl': u'http://api.ft.com/content/items/v1/b0cb0082-97aa-11db-a680-0000779e2340',
u'location': {
u'uri': u'http://www.ft.com/cms/b0cb0082-97aa-11db-a680-0000779e2340.html'
},
u'id': u'b0cb0082-97aa-11db-a680-0000779e2340',
{
"response": {
"status": "ok",
"userTier": "developer",
"total": 60576,
"startIndex": 1,
"pageSize": 8,
"currentPage": 1,
"pages": 7572,
"orderBy": "relevance",
@Sanyambansal76
Sanyambansal76 / Tor Setup link
Created January 31, 2017 11:29
Tor Setup link
@Sanyambansal76
Sanyambansal76 / GULP TASK
Created January 19, 2017 06:40
GULP TASK
"use strict";
var gulp = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync');
var concat = require('gulp-concat');
var connect = require('gulp-connect');
var imagemin = require('gulp-imagemin');
var newer = require('gulp-newer');
var notify = require('gulp-notify');
@Sanyambansal76
Sanyambansal76 / Create High Quality Image Using Wand
Created January 18, 2017 14:53
Create High Quality Image Using Wand
#Install Wand and Imagemagic Lib on Your System
#Pass the resolution paramenter in the Image Init Method
from wand.image import Image
with Image(filename='file.pdf', resolution=200) as image:
image.compression_quality = 99
image.save(filename='file.jpg')
@Sanyambansal76
Sanyambansal76 / gist:9add20e6cde8eedff301044e656df1dc
Last active January 12, 2017 18:48
AWS CodeDeploy and Codeship Intergration
#Create a aws account
#CREATE I AM ROLE
1. Create the IAM role
2. Open the IAM from the your aws dashboard
3. Click on the roles
4. Click on create new role
5. Enter the Role Name CodeDeployInstanceRole
6. Attach Following Policies
a. AmazonEC2RoleforAWSCodeDeploy
@Sanyambansal76
Sanyambansal76 / Django Access the Request or User Object Inside the Models and Signals.txt
Last active May 3, 2018 02:50
Django Access the Request or User Object Inside the Models and Signals.
#Access Request Object Inside the Models and Signals
#Create a middleware.py inside any app for example :- blog
#middleware.py
import threading
class RequestMiddleware(object):
thread_local = threading.local()