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
# Warning in ./libraries/sql.lib.php#613 | |
# count(): Parameter must be an array or an object that implements Countable | |
# https://stackoverflow.com/a/50536059/6393270 | |
sudo sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.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
defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE |
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
sudo wget /Library/Keyboard\ Layouts/Hungarian_Win.keylayout https://raw.githubusercontent.com/zaki/mac-hun-keyboard/master/Hungarian_Win.keylayout |
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
#!/bin/bash -ex | |
# | |
# configures wordpress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# script is aware of .git directories by default. edit if you need to consider | |
# other folders as well. | |
# | |
# you will find a log file in /tmp/ in case you fucked up. |
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
const getRandomPort = (min, max) => { | |
const port = Math.round(Math.random() * (max - min) + min); | |
return { | |
port: port, | |
p1: parseInt(port / 256, 10), | |
p2: port % 256, | |
}; | |
}; |
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
const toRad = function (number) { | |
return number * Math.PI / 180; | |
} | |
const calculateDistance = function (lat1, lon1, lat2, lon2) { | |
var R = 6371; // 6371 - km | 6371e3 - m | |
var dLat = toRad(lat2 - lat1); | |
var dLon = toRad(lon2 - lon1); | |
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + | |
Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) * |
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
// https://gist.github.com/icetee/2fb391954dbf16dfc81bc08ce8436f3f | |
// Usage : googremarketing.loadTag(conversionid, conversionlabel) | |
// Start Google Remarketing Module | |
var googremarketing = (function() { | |
var asyncload = 0; | |
// Load Async Google Adwords remarketing code | |
function Gremloader() { | |
if (asyncload == 0) { | |
var g = document.createElement('script'); | |
var s = document.getElementsByTagName('script')[0]; |
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
/** | |
* Használat: | |
* | |
* Bejelentkezés után, menj a http://whatnext.eu/koveto oldalra. | |
* Csoportosított sorozatonként lehet letölteni JSON formában. | |
* Devtool-ban lévő konzolba futtasd le. | |
* Amikor már látod, hogy hosszabb idő elteltével nincs újabb mentés, akkor | |
* add ki ezt a parancsot: | |
* | |
* downloadObjectAsJson(export); |
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
// Use: | |
// get_theme_mod('theme_hover_logo'); | |
function theme_customizer_setting($wp_customize) { | |
$wp_customize->add_setting('theme_hover_logo'); | |
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_hover_logo', [ | |
'label' => 'Upload Hover Logo', | |
'section' => 'title_tagline', | |
'settings' => 'theme_hover_logo', | |
'priority' => 8, |
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
// @icetee - https://gist.github.com/icetee/946683aca3f0149aba5c56d14ded2897 | |
(function($, opt) { | |
var picker = function(opt) { | |
var self = this; | |
self.opt = opt; | |
var $picker = $(self.opt.selector); | |
if (!$picker) return; | |
var attr = $.extend({ |