Skip to content

Instantly share code, notes, and snippets.

@Snarp
Snarp / google-docs-copy.js
Last active April 29, 2024 21:03
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 30, 2024 14:54
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@garagemwp
garagemwp / functions.php
Last active February 22, 2021 18:49
Action para não permitir que uma conta seja cadastrada no Woocommerce com um CPF já existente.
<?php
/*
Action para não permitir que uma conta seja cadastrada no Woocommerce com um CPF ou CNPJ já existente.
Esta action adiciona esta condicional para o campo de CPF ou CNPJ inserido pelo do plugin Extra Checkout Fields for Woocommerce
Você pode inserir este código no arquivo functions.php do seu tema.
*/
add_action('woocommerce_checkout_process', 'check_if_cpf_cnpj_exists');
function check_if_cpf_cnpj_exists() {
if( isset( $_POST['billing_cpf'] ) ){
@sebz
sebz / grunt-hugo-lunrjs.md
Last active April 29, 2024 16:44
hugo + gruntjs + lunrjs = <3 search
@aheckmann
aheckmann / storeImgInMongoWithMongoose.js
Created April 17, 2012 19:14
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path