Skip to content

Instantly share code, notes, and snippets.

View yopefonic's full-sized avatar
🏔️
Moving mountains

Joost Elfering yopefonic

🏔️
Moving mountains
  • ITS Collective, Yopefonic Inc, RAM Infotechnology
  • Sassenheim, Netherlands
View GitHub Profile
@yopefonic
yopefonic / slack_delete.rb
Created November 20, 2015 15:24 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@yopefonic
yopefonic / primes.js
Last active August 29, 2015 14:03
primes between X and Y
// assignment:
// Return all prime numbers between $nMin and $nMax (where $nMin and $nMax are arguments
// supplied to your function)*Bonus points for clarity, coding standards and quality of comments.
// Bonus points for efficiency of the algorithm.
function isPrime(number) {
if (number < 2) {
return false; // number 1 or lower cannot be a prime number
} else {
for (var i = 2; i < number; i++) { // loop through numbers from 2 to number and check the modulo