Skip to content

Instantly share code, notes, and snippets.

View sbalci's full-sized avatar
🔬
🔬👀📑🗃📊🏨🗄📇📖⚗📝🎶📈📉📃🖍🔬🔬🏋🏻‍♂🚴🏻‍♂🚙👨‍💻🤷‍♂📸📺🎛🔭🔬💊🔐🍫🌸

Serdar Balcı sbalci

🔬
🔬👀📑🗃📊🏨🗄📇📖⚗📝🎶📈📉📃🖍🔬🔬🏋🏻‍♂🚴🏻‍♂🚙👨‍💻🤷‍♂📸📺🎛🔭🔬💊🔐🍫🌸
View GitHub Profile
@sbalci
sbalci / Git: Empty branch.md
Created January 5, 2021 10:04 — forked from blattmann/Git: Empty branch.md
Git: Create empty branch

Replace empty-branch with your desired branch name.

git checkout --orphan empty-branch

Then you can remove all the files you'll have in the staging area (so that they don't get committed):

git rm -rf .

At this point you have an empty branch, on your machine.

@sbalci
sbalci / Subfolder to git repo.md
Created January 2, 2021 13:48 — forked from cruftlord/Subfolder to git repo.md
Convert subfolder into Git submodule
<?php
/**
* This recipe will redirect you to the levels page after registration
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_redirect_after_register( $user_id ){
@sbalci
sbalci / citations_to_retracted_by_journal.csv
Created October 31, 2020 14:41 — forked from domenicrosati/citations_to_retracted_by_journal.csv
Journal Citations to Retracted Articles Post Retraction
Journal Total Citations Citations to Retracted Articles Post Retraction % of citations to retracted articles
plos one 12783331 2959 0.02%
scientific reports 6295134 1227 0.02%
oncology letters 802286 898 0.11%
journal of biological chemistry 10712422 866 0.01%
biomed research international 1789456 806 0.05%
oncotarget 1353740 791 0.06%
international journal of molecular sciences 2380553 766 0.03%
proceedings of the national academy of sciences 9984417 704 0.01%
molecular medicine reports 754664 646 0.09%
@sbalci
sbalci / remove_billing_example.php
Created October 12, 2020 14:45 — forked from andrewlimaza/remove_billing_example.php
Remove 'Billing' from 'Billing Address' title in Paid Memberships Pro.
<?php
/**
* Copy the function below into your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* This function uses the gettext filter which will change all text occurences of Billing Address to Address in Paid Memberships Pro.
*/
function change_text_billing_pmpro( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Billing Address' :
$translated_text = __( 'Address', 'paid-memberships-pro' );
break;
@sbalci
sbalci / change_pmpro_account_text.php
Created October 12, 2020 14:44 — forked from andrewlimaza/change_pmpro_account_text.php
change pmpro account text with gettext filter
<?php
//copy lines 5 onwards into your PMPro customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
add_filter( 'gettext', 'change_my_pmpro_account_text', 20, 3 );
/**
* Change words for pmpro account page
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
<?php
/*
* Add this code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* This will add billing fields to Add Member and the user's profile page.
*/
function add_billing_fields_to_add_member_profile() {
//check for register helper
if(!function_exists("pmprorh_add_registration_field"))
return;
@sbalci
sbalci / add-billing-to-add-member-and-profile.php
Created October 12, 2020 14:43 — forked from gausam/add-billing-to-add-member-and-profile.php
Add billing fields, with dropdown for country, to the Membership Profile page
<?php
/**
* This recipe adds billing fields to the Membership Profile page.
*
* It is intended for use with the Register Helper Add On:
* https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@sbalci
sbalci / pasteUsingSepAndCollapseInR.R
Created June 11, 2020 14:57 — forked from briandk/pasteUsingSepAndCollapseInR.R
Understanding `sep` and `collapse` in R using `paste()
# The difference between the `sep` and `collapse` arguments
# in paste can be thought of like this:
#
# paste can accept multiple *vectors* as input, and will
# concatenate the ith entries of each vector pairwise
# (or tuplewise), if it can.
#
# When you pass paste multiple vectors, sep defines what
# separates the entries in those tuple-wise concatenations.
#