Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Gabor Javorszky javorszky

🏠
Working from home
View GitHub Profile
@javorszky
javorszky / wordpress-plugin-svn-to-git.md
Created Jul 11, 2017 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
View wordpress-plugin-svn-to-git.md
@javorszky
javorszky / colortest.sh
Created Mar 16, 2021
small sh file to test coloring in terminals, 16 colors
View colortest.sh
#!/bin/sh
echo "\033[30m Black"
echo "AAAAAAAAAAA"
echo ""
echo "\033[31m Red"
echo "AAAAAAAAAAA"
echo ""
echo "\033[32m Green"
echo "AAAAAAAAAAA"
View gist:7098185
.designs/
wp-content/*
!wp-content/themes
wp-content/themes/**/node_modules
wp-content/themes/**/.sass-cache
View gform_custom_field.php
<?php
/**
* This function is responsible to add multiple fields into the input.
* Without this the subfields won't even get mentioned in the form.
* Also, this is only true if the form does not have a field of this
* type yet. If it does, and you change this, the changes will NOT
* show up in the form.
*
* For reference, go to /plugins/gravityforms/js.php
View gist:6019276

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@javorszky
javorszky / IEconsole.js
Created Jun 13, 2013
how to stop IE from bitching about missing console
View IEconsole.js
/**
* Making sure that console.log will not kill
*/
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
@javorszky
javorszky / strpos.php
Created Jun 10, 2013
Why I hate PHP part n
View strpos.php
<?php
$var[] = "Email";
$var[] = "Notmail";
foreach($var as $v) {
if(strpos($v, "Email")){
echo "Yes, this is email";
} else {
echo "Not email";
@javorszky
javorszky / 960-border-box.sass
Created Jun 5, 2013
960.gs is an awesome starter grid. Sadly it's content box... so I've made it play nice with border-box
View 960-border-box.sass
$width: 960px
$cols: 12
$gutter: 16px
@mixin clearfix-micro()
&
*zoom: 1
&:before,
&:after
View example_bob.js
{
"id": 4,
"name": "Bob",
"email": "bob@fromaccounting.com",
"meta": {
"plugins": [
"foo": {
"setting1": "value1",
"etc": "etc"
},
View client_meteor.js
// The client side:
Template.resend_verification.rendered = function(){
console.log('this is the rendered function');
userId=Session.get('selectedUserId');
var user = Meteor.user(),
emails = user.emails,
verified = false,
sent = false;