Skip to content

Instantly share code, notes, and snippets.

View Saeven's full-sized avatar

Alexandre Lemaire Saeven

View GitHub Profile
@zthomas
zthomas / intercom-delete-old-users.js
Last active May 1, 2023 15:28
Script to delete and clear old users from intercom. Useful for lowering the monthly bill
// License: MIT, feel free to use it!
const Intercom = require('intercom-client');
const appId = 'APP_ID'
const apiKey = 'APP_KEY'
const client = new Intercom.Client(appId, apiKey);
const async = require('async-q')
//REF: https://developers.intercom.com/reference#iterating-over-all-users
//WARNING: you can only have one scroll working at once. you need to wait for that scroll to clear to try again
@bagage
bagage / pre-receive
Last active January 23, 2024 07:04
Submodule commit checker pre-receive server-side git hook
#!/bin/bash
# Service side git pre-receive hook
# Written by Gautier Pelloux-Prayer <gautier+git@damsy.net>, 2014
#
# Public domain
#
# Simply put this script in server git bare repository <your-git-folder>/hooks and
# apply 'chmod +x pre-receive'.
#
@mnapoli
mnapoli / behat-reference.feature
Last active February 12, 2024 10:54
Behat Mink reference
# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page
@ralphschindler
ralphschindler / example.php
Created October 24, 2012 23:18
Zend\Db\Sql\Select example usage
<?php
use Zend\Db\Sql\Select;
// basic table
$select0 = new Select;
$select0->from('foo');
// 'SELECT "foo".* FROM "foo"';