This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="author" content="Martin Bean" /> | |
| <title>Twitter’s Bootstrap with Ryan Fait’s Sticky Footer</title> | |
| <link rel="stylesheet" href="css/bootstrap.min.css" /> | |
| <style> | |
| html, body { | |
| height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # API authentication | |
| from social.apps.django_app.utils import strategy | |
| from rest_framework.authtoken.models import Token | |
| from rest_framework.views import APIView | |
| from rest_framework import parsers | |
| from rest_framework import renderers | |
| from rest_framework.authentication import get_authorization_header | |
| from rest_framework.response import Response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from rest_framework.authentication import SessionAuthentication | |
| class SuperUserAuth(SessionAuthentication): | |
| def authenticate(self, request): | |
| request = request._request | |
| user = getattr(request, 'username', None) | |
| #if not user or not user.is_active or not user.is_superuser: | |
| #return None | |
| if not username: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery('.field').each(function(i) { | |
| var id = parseInt($(this).attr('id')); | |
| var value = response.data[id].Value; | |
| var floatvalue = parseFloat(response.data[id].RawValue); | |
| var intvalue = parseInt(response.data[id].RawValue); | |
| if ((id >= 2) && (id <= 9)) { | |
| if (floatvalue > 849.5) { | |
| value = "OPEN"; | |
| } | |
| else if (floatvalue < -199.5) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://stackoverflow.com/questions/16901246/how-to-minify-css-files-with-requirejs | |
| #1. Create a style.css file and @import all your other css's into this file. | |
| @import url("css/firstfile.css"); | |
| @import url("css/secondfile.css"); | |
| #2. Create a build.js file as follows: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //1) Made changeds to menu.php (added xml element "Login" to item_tag) | |
| //2) menu.js added function to run it in eval. Login() | |
| //3) Installed php library HybridAuth. /adei/includes/hybridauth-2.1.2/install.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://ctf.gpn.entropia.de:50000/?user=')' // проблема в том, что сайт не дает поиск пользователя и нам надо сделать MySQL инъекцию, чтобы достать доступ к пользователю, для этого нужно эскейппоследовательность сделать и посмотреть какую ошибку даст MySQL. | |
| Ответ: user='=' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function whatDoesItDo(val){ | |
| return val ? 1 : 2; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.ComponentModel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Newtonsoft.Json.Linq; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace jsonorm | |
| { |
OlderNewer