Skip to content

Instantly share code, notes, and snippets.

View gluschenko's full-sized avatar
:octocat:

Alexander Gluschenko gluschenko

:octocat:
View GitHub Profile
<html>
<head>
<title>Генератор случайных чисел</title>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
function Write(id, val) {
Find(id).innerHTML = val;
}
function getmess(){
$.ajax({
url:"get_mess.php",
type:"POST",
data:{"id":id},
cahce:false,
timeout:30000,
async:true,
success:function(result){
$("#response").html(result);
using UnityEngine;
using System;
using System.Collections.Generic;
public class DebugConsole : MonoBehaviour
{
struct ConsoleMessage
{
public readonly string message;
public readonly string stackTrace;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Test : MonoBehaviour {
List<GameObject> people = new List<GameObject>();
Vector2 ScrollPos = new Vector2(0, 0);
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ComboText : MonoBehaviour {
public static List<ComboEntry> Entries = new List<ComboEntry>();
public float Speed = 10;
public static float Offset = 90;
var mid = function (v) {
var cx = 0;
var cy = 0;
for (var i = 0; i < v.length; i++) {
cx += v[i].x;
cy += v[i].y;
}
cx /= v.length;
public static object GetPropValue(object src, string propName)
{
return src.GetType().GetProperty(propName).GetValue(src, null);
}
function isMobile() {
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)){
return true;
}
@gluschenko
gluschenko / Chrome-Cache-Viewer.js
Last active December 22, 2015 16:54
Paste this code to the developer console (F12).
document.body.innerHTML = "<div id='iii'></div>" + document.body.innerHTML;
var iii = document.getElementById("iii");
var table = document.getElementsByTagName("table")[0];
table.style.display = "none";
var dom = document.getElementsByTagName("a");
var count = 0;
var interval = setInterval(function(){
Web = new function () {
function CreateXMLHTTP() { // кроссбраузерный костыль на случай атомной войны (со всякими IE 6)
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {