Skip to content

Instantly share code, notes, and snippets.

View keriati's full-sized avatar
👨‍💻
Working...

Attila Kerekes keriati

👨‍💻
Working...
View GitHub Profile
@keriati
keriati / encodeDecode.php
Last active December 13, 2015 16:49
Test of the encoding and decoding function found in fliphole.php
<?php
/**
* Encodes or Decodes some string
*
* @param string $string The string to encode or the string to decode
* @param string $secretkey The key to encode or decode with
*/
function encodeDecode($string, $secretkey) {
@keriati
keriati / addjquery.js
Created February 12, 2013 18:06
Bookmark content to add jQuery to current document. Put after "javascript:"
(function(){if(!window.jQuery){var s=document.createElement('script'), d = document.body;s.src='//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js';d.appendChild(s);}else{console.log('jQuery found!')}})();
@keriati
keriati / headings.js
Last active December 11, 2015 14:09
List all Headings on a Page to the console.
(function(){$('h1,h2,h3,h4,h5').each(function(){var t=$(this),n=t[0].tagName,i=parseInt(new String(n).substr(1,1));console.log(new Array(i).join(' ')+n+': '+t.text().replace(/\s{2,}/g,' '));});})();
@keriati
keriati / gist:4284294
Created December 14, 2012 10:18
Android tools
// Check how the APK is signed
jarsigner -verify -verbose -certs myapk.apk
@keriati
keriati / objects.js
Created October 10, 2012 08:52
Javascript Objects
(function () {
var NS = NS || {};
NS.SomeObject = (function () {
var defaults = {
a: "A"
}
function Constr(options) {
@keriati
keriati / module.html
Created September 9, 2012 18:51
Module pattern ...
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
@keriati
keriati / API.md
Created September 7, 2012 18:13 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@keriati
keriati / changeText.js
Created August 23, 2012 12:52
Change the text content in one element.
/**
* Change only the text content of some element
*
* @method changeText
* @param element {Object} Element
* @param text {String} New text
* @param prepend {Boolean} If set to true, the text will be prepended to the element
* @return {Boolean} True if the change was successfull, false if not
*/
function changeText(element, text, position) {
(function () {
$('h4 a').each(function() {
var $this = $(this),
content = $this.html(),
wordsArray = content.split(" "),
newcontent = [];
$this.html('');
$.each(wordsArray, function(i, e) {
@keriati
keriati / scrolling.html
Created August 20, 2012 19:59
Basic scrolling menu example
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.hide {
display: none;
}
</style>