Skip to content

Instantly share code, notes, and snippets.

@Snarp
Snarp / google-docs-copy.js
Last active July 12, 2024 13:19
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 July 25, 2024 10:23
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 June 28, 2024 18:41
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