Skip to content

Instantly share code, notes, and snippets.

View graciano's full-sized avatar

Graciano graciano

View GitHub Profile
@visualglitch91
visualglitch91 / index.js
Created August 12, 2020 21:57
Delete all tweets
(async () => {
const twitterClientToken =
"AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA";
function getCookie(cname) {
const name = cname + "=";
const decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(";");
for (let i = 0; i < ca.length; i++) {
@pirate
pirate / docker-compose-backup.sh
Last active July 4, 2024 22:50
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@bkeating
bkeating / graphiql-dark-mode.css
Last active April 25, 2023 13:31
GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating
<style>
/* GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating[1]
* Colors taken from Atom's One Dark theme[2]. Add this file to the end of
* your <head> block[3] to override built-in default styling.
*
* [1]. https://twitter.com/flowpoke
* [2]. https://github.com/atom/atom/tree/master/packages/one-dark-ui
* [3]. e.g. `.../site-packages/graphene_django/templates/graphene/graphiql.html`
*/
@diegoos
diegoos / _readme.md
Last active April 24, 2018 15:02
Script to deploy gh-pages for Vue (Webpack) projects

Setup

Copy the deploy.sh on root of your project.

Deploy

Just run ./deploy.sh

@diegoos
diegoos / ApacheHTTPSConfig.md
Created March 29, 2018 20:53 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@victorcfernandes
victorcfernandes / bunny.js
Last active March 29, 2018 15:03
Happy Easter
// ABRA O GOOGLE CHROME, PRESSIONE `CTRL + SHIFT + J`, COLE O CÓDIGO ABAIXO E APERTE ENTER
const name = window.prompt("Qual seu nome?", "Anonymous");
const bunny = `
<h1>CONGRATS, ${name}! YOU ARE A HACKER NOW!</h1>
<h1>Happy Easter!</h1>
<pre style="background:#000; text-align:left; max-width:200px; margin:0 auto;">
&sol; &bsol;
&sol; _ &bsol;
| &sol; &bsol; |
@callmeloureiro
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active January 15, 2024 20:44
Como fazer alguém te responder no whatsapp
/*
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o web.whatsapp.com;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;
@Prof9
Prof9 / Readme.md
Last active February 1, 2024 07:02
THIS SCRIPT NO LONGER WORKS! Twitter has rolled out a fix for the web client hack. (Original text: Force enable cramming (280 character tweets) on Twitter. Use TamperMonkey. NOTE: Stops working when you switch pages, refresh to fix.)

As of 7 November 2017 everyone has access to 280 characters in supported clients, so you no longer need this script!

@Rycochet
Rycochet / exceljs.d.ts
Last active October 19, 2023 09:22
Typescript definitions for ExcelJS
/*
* Type definitions for ExcelJS
* Project: https://github.com/guyonroche/exceljs
* Definitions by: Rycochet https://github.com/Rycochet
*
* This is a WIP
*/
declare namespace ExcelJS {
type Zip = any;
@glebm
glebm / primes.rs
Last active August 22, 2020 19:24
Rust: Erathosthenes prime sieve
fn is_prime(n: usize, primes: &Vec<usize>) -> bool {
for &p in primes {
let q = n / p;
if q < p { return true };
let r = n - q * p;
if r == 0 { return false };
}
panic!("too few primes")
}