Skip to content

Instantly share code, notes, and snippets.

View Serrin's full-sized avatar

Ferenc Czigler Serrin

  • Budapest
View GitHub Profile
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active June 28, 2025 20:00
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@diegopacheco
diegopacheco / js-frontend-resources.md
Last active December 11, 2017 22:36
Frontend / JavaScript Resources
//Here's a non-jQuery version:
function toQueryString(obj) {
var parts = [];
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
parts.push(encodeURIComponent(i) + "=" + encodeURIComponent(obj[i]));
}
}
return parts.join("&");
@hobord
hobord / fidesz_sajto_generator.js
Created June 7, 2017 10:44
Index.hu-n talalt fidesz sajto kozlemeny generator
<script>
var randomText = {
items: [],
items_default: [
[],
[ "A DK", "A Jobbik", "Az LMP", "Az MSZP", "A Momentum", "Gyurcsány Ferenc és pártja", "Vona Gábor és pártja", "Botka László és pártja", "A milliárdos Gyurcsány Ferenc és pártja", "A luxusban élő Botka László és pártja" ],
[ "nekik kellene csöndben maradniuk", "ők szégyellhetik magukat", "ők járatták le magukat hazugságaikkal", "nekik kellene önvizsgálatot tartaniuk", "nekik kellene magukba nézniük", "ők váltak teljesen hiteltelenné" ],
[ "hagyták tönkremenni az egészségügyet", "nem tiltakoztak a vizitdíj ellen", "keveredtek oligarchák hálójába", "kezdték ki a magyarok nemzeti identitását azzal, hogy az EU-hoz törleszkedtek", "sodródtak a terrortól rettegő Nyugat-Európához", "hagyták elértéktelenedni a nyugdíjakat" ],
[ "a korábbi választási ciklusokban", "2010 előtt", "Gyurcsány és a szocialisták kormányzása idején", "az MSZP kormányzása alatt", "a 2000-es évek második felében" ],
[ "a foglalko
@danilosilvadev
danilosilvadev / ES2015In20Minutes.js
Last active June 7, 2021 15:25
A quick guide to reference the ES06
//This gist is a fast reference to ES06 to whose already knows es05.
//I'm trying to use a different approach: first the example and after the explanation.
//Lesson 1: Template literals
console.log(`hello ${firstname},
how are you?`);
//Template literals are string literals with support for interpolation(using ${variable}) and multiple lines.
@samueljseay
samueljseay / es6-import-cheat-sheet.md
Created June 2, 2017 02:35
ES6 exports / imports cheat sheet
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
@lavandosovich
lavandosovich / poo.md
Last active March 21, 2020 11:51
PHP7 Object Orientetion

OOP in PHP

Declaring class properties or methods as static makes them accessible without needing an instantiation of the class. A property declared as static can not be accessed with an instantiated class object (though a static method can).

Useful keywords:

self - self from the root

parent - parent of the class

static - true self for exact class, static is more agile than self, super useful for inheritance issues

@apisandipas
apisandipas / share-urls.md
Last active March 31, 2025 07:50 — forked from chrisl8888/drupal-views-share-global-text-field
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@krmgns
krmgns / Element.prototype.classList.js
Last active October 28, 2020 01:25
Polyfill: Element.prototype.classList for IE8/9, Safari.
/**
* Element.prototype.classList for IE8/9, Safari.
* @author Kerem Güneş <[email protected]>
* @copyright Released under the MIT License <https://opensource.org/licenses/MIT>
* @version 1.2
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
*/
;(function() {
// Helpers.
var trim = function(s) {
@jochemstoel
jochemstoel / httpStatusCodes.js
Created December 28, 2016 13:29 — forked from marlun78/httpStatusCodes.js
An HTTP Status Codes object
/**
* HTTP Status Codes
* Copyright (c) 2012, marlun78
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83
*
* Taken from: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
* Visual Studio find regex: ^(\d{3}) ([^\r\n]+)\r\n
* Visual Studio replace regex: '$1': '$2', //
* Notes wrapped in parens moved manually
*/