Skip to content

Instantly share code, notes, and snippets.

View danyell's full-sized avatar

Daniel de Segovia Gross danyell

View GitHub Profile
@danyell
danyell / htc.php
Last active May 12, 2022 22:17
.htaccess compiler
<?php
/*
* .htaccess compiler
*
* Recurse through all subdirectories, scan .htaccess files, and generate
* directives suitable for inclusion in an Apache configuration file.
* This lets you consolidate all .htaccess directives in the main
* (scanned once) Apache configuration. This has considerable
* performance and security benefits.
*
@simeji
simeji / get_repo_stars.sh
Last active August 29, 2022 07:38
Get count of Github repository stars
#!/bin/bash
USER=$1
REPO=$2
if [ -z "$USER" -o -z "$REPO" ]; then
echo '$1 : Github username, $2: Github repository name (only public repo)'
exit 1
fi
FILENAME=star_${USER}_${REPO}
@dommmel
dommmel / invite_to_slack.js
Created May 25, 2016 14:40
Zapier Code to auto invite users to slack
var slackTeam = "YOUR_SLACK_TEAM_NAME ";
var token = 'YOUR_ADMIN_TEST_TOKEN';
// A test token will suffice.
// You can generate one at https://api.slack.com/docs/oauth-test-tokens
// Just make sure that the user issuing the test token is an admin.
var url = 'https://'+ slackTeam + '.slack.com/api/users.admin.invite';
fetch(url, {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
@scottmagdalein
scottmagdalein / clickable-element.html
Last active March 15, 2023 18:01
Make the Mailchimp Subscriber popup appear on click
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>