Skip to content

Instantly share code, notes, and snippets.

Benny Bennet Jürgens bennybennet

Block or report user

Report or block bennybennet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ES6-Module-Scope.js
// !-- /app/test.js
var test = [];
export { test };
// !-- file.js
import { test } from "./app/test";
test.a[0] = "h";
// !-- file2.js
import { test } from "./app/test";
@bennybennet
bennybennet / gist:c47a1a86dc1bd448413e
Created Nov 10, 2014
Delete All Revisions Of Post Of Which Are Published
View gist:c47a1a86dc1bd448413e
DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b
ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c
ON (a.ID = c.post_id)
INNER JOIN (SELECT * FROM wp_posts WHERE post_status = 'publish') d
ON a.post_parent = d.ID
WHERE a.post_type = 'revision'
View gist:5239396
<script type="text/javascript" src="http://some.tld/web/service?callback=verarbeiteDaten"></script>
... wird zu
<script type="text/javascript">
verarbeiteDaten({"Name": "Benny Bennet", "Website": "http://ben.nyben.net"})
</script>
View gist:5239349
function verarbeiteDaten( data ) {
console.log(data["Name"]);
console.log(data["Website"]);
}
View gist:5239297
JSON: {"Name": "Benny Bennet", "Website": "http://ben.nyben.net"}
JSONP: verarbeiteDaten({"Name": "Benny Bennet", "Website": "http://ben.nyben.net"})
View gist:5239234
<script type="text/javascript">
;(function() {
console.log("Hello World")
})();
</script>
View gist:5239209
<script type="text/javascript" src="http://meinserver.de/meinScript.js"></script>
@bennybennet
bennybennet / reset-button.css
Last active Dec 15, 2015
reset rendering for button elements in Firefox
View reset-button.css
button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner {
border: 0;
padding: 0;
margin: 0;
}
View selectbox-style.js
$('select.bb-styled').each(function(){
var title = $(this).attr('title');
if( $('option:selected', this).val() != '' ) title = $('option:selected',this).text();
var idName = $(this).attr('id') + '_container';
$(this).before('<div class="bb-styled-container" id="' + idName + '"></div>')
$('#' + idName).append(this);
$(this)
.css({'opacity':0})
View selectbox-style.css
div.bb-styled-container { position:relative; margin: 50px; }
select.bb-styled {
position: relative;
z-index:10;
display: block;
-webkit-appearance:none;
-moz-appearance:none;
appearance:none;
cursor:pointer;
}
You can’t perform that action at this time.