Skip to content

Instantly share code, notes, and snippets.

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

Serdar Balcı sbalci

🔬
🔬👀📑🗃📊🏨🗄📇📖⚗📝🎶📈📉📃🖍🔬🔬🏋🏻‍♂🚴🏻‍♂🚙👨‍💻🤷‍♂📸📺🎛🔭🔬💊🔐🍫🌸
View GitHub Profile
@sbalci
sbalci / repo-reset.md
Created January 31, 2021 16:14 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@sbalci
sbalci / !Making Measurements in QuPath
Created January 25, 2021 05:24 — forked from Svidro/!Making Measurements in QuPath
Making Measurements in QuPath
Collections of scripts harvested mainly from Pete, but also picked up from the forums
TOC
Accessing dynamic measurements.groovy - Most annotation measurements are dynamically created when you click on the annotation, and
are not accessible through the standard getMeasurement function. This is a way around that.
Affine transformation.groovy - access more accurate measurements for the affine transformation used in the image alignment (m5/m6+)
Alignment of local cells.groovy - check neighborhood for similarly aligned cells
@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.