Skip to content

Instantly share code, notes, and snippets.

View morzzz007's full-sized avatar

Márton Papp morzzz007

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>E-VENTURES</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
@morzzz007
morzzz007 / Replace
Last active June 28, 2016 17:58
Eurosport Excel Macro
Sub Makró2()
'
' Makró2 Makró
'
'
Columns("H").Replace What:="EUROSPORT 1", _
Replacement:="INTER", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
this.getUser = function() {
if (whoami_data != null) { // Use data from 'cache'
var deferred = $q.defer();
deferred.resolve({ data: whoami_data });
return deferred.promise;
}
else if (whoami_data == null && promiseSent) {
return promiseCache;
}
else{
$.ajax({ type: "POST",
url: 'https://lensa.com/sg/game-event/',
contentType:"application/json; charset=utf-8",
dataType:"json",
data: JSON.stringify({
game_id: "2975b658b019442b8f6c20f553612fb0-1ce8611e5ad64337a2664024776c92e8",
event:{
click_count: 1,
level: 2,
node_rels: [{n1: -2, n2: 1}, {n1: 0, n2: 1}, {n1: -1, n2: 0}, {n1: -2, n2: 0}, {n1: -2, n2: -1}],
<section id="posts" class="content clearfix {block:HideTitle}{block:HideDescription}no-title-desc {/block:HideDescription}{/block:HideTitle}{block:HideHeaderImage}no-image {/block:HideHeaderImage} {block:ShowAvatar}avatar-style-{AvatarShape}{/block:ShowAvatar} {block:HideAvatar}avatar-hidden{/block:HideAvatar} {block:IfNotCollapseNavigation}exposed-nav{/block:IfNotCollapseNavigation}">
<div data-page-id="{CurrentPage}">
{block:Posts}
<article class="{block:Text}text {/block:Text}{block:Photoset}photoset {/block:Photoset}{block:Photo}photo {/block:Photo}{block:RebloggedFrom}reblogged {/block:RebloggedFrom}{block:Quote}quote {/block:Quote}{block:Link}link {/block:Link}{block:Chat}chat {/block:Chat}{block:Audio}audio {/block:Audio}{block:Video}video {/block:Video}{block:Answer}answer {/block:Answer}{block:Date}not-page post-{PostID}{/block:Date} {block:PermalinkPage} active exposed{/block:PermalinkPage}" {block:Date}data-post-id="post_{PostID}"{/block:Date}>
<div
@morzzz007
morzzz007 / readme.md
Last active August 29, 2015 14:19
Lensa Form

Lensa Form

###Common Properties

  • name
  • label
  • description

###Text

  • value: string - initial value
  • required: bool
@morzzz007
morzzz007 / languagechanger.js
Created April 20, 2015 09:42
Lensa Lang Change
angular.module('lensaNgApp').directive('languageChanger', ['$window', function($window){
'use strict';
return {
link: function($scope, element, attrs) {
var elemLang = attrs.id.split("-")[2];
// set current lang active
if(elemLang == $window.LENSA_LANG) {
.post-content blockquote {
border-left: 3px solid rgba(0, 0, 0, 0.2);
}
.notes li {
color: #A7A7A7;
border-top: 1px solid rgba(0, 0, 0, 0.2);
}
.notes blockquote {
@morzzz007
morzzz007 / gist:98d58f5b3a39834fb092
Created March 5, 2015 07:55
validatorService HowTo Basic
// 1. param: $scope, or empty object {}
// 2. param: the form
// 3. param: storage method to call with data
// 4. param: client side validated field names => equals to html name='...' attribute
// 5. param: success callback function, where data = response.data
validatorService.validateForm($scope, form, function () { return randomStorage.method(data_to_send); },
['field_name_1', 'field_name_2'],
function (data) {
// use response data here
@morzzz007
morzzz007 / gist:b84dbac04062b54783c7
Created March 5, 2015 07:49
Manually display validator tooltip on field
// form object is required
var field_name = 'pw'; // field name as a string
var message = msgs.data.passwordmatch; // error message as a string
$scope.$broadcast('display-validator-tooltips', form.$name, field_name, message, true);