This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "slack" | |
client = Slack::Client.new token: ENV['TOKEN'] | |
LIMIT = 20 # days | |
from_time = Time.now.to_i - (60 * 60 * 24 * LIMIT) | |
pages = client.files_list(:types => 'images', ts_to: from_time)['paging']['pages'].to_i | |
deleted_files_count = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "slack" | |
# | |
# gem install slack-api | |
# | |
# Get the token from here: https://api.slack.com/docs/oauth-test-tokens | |
# | |
client = Slack::Client.new token: ENV['TOKEN'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stashq is an alias to prevend auto-sign stashes (prompt for password): | |
# git config --global alias.stashq '-c commit.gpgsign=false stash' | |
function update-from-remote() { | |
remote=${1:-"origin"} | |
branch=${2:-"master"} | |
if ! git remote | grep "${remote}" > /dev/null; then | |
echo "There is no remote like ${remote}" | |
return 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Select them | |
jQuery('.wishlistRow').on('click', function() { jQuery(this).toggleClass('wanttoremove'); }); | |
# Finish | |
jQuery('.wanttoremove').each(function() { | |
var id = this.getAttribute('id').split('_')[1]; | |
jQuery.post( | |
'/id/yitsushi/wishlist/', | |
{ | |
appid: id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1JpEjoxTu3d4gMDipmgrekXRvkENs9Ya7r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$with_unsused = false; | |
define('LIMIT', 1000000); | |
class MyClass { | |
public function test() {} | |
} | |
function callSomething() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
days=${1:-1} | |
current_dir=$(pwd) | |
homebrew_prefix=$(brew --prefix) | |
for formula_dir in $(find ${homebrew_prefix}/Homebrew/Library/Taps -name "Formula" -type d); do | |
cd $formula_dir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Single-Click Version: | |
// 1. Create a bookmark with: | |
javascript:document.body.addEventListener("click",function(t){for(var e=window.getSelection(),n=e.getRangeAt(0),o=e.anchorNode;0!=n.toString().indexOf(" ");)n.setStart(o,n.startOffset-1);n.setStart(o,n.startOffset+1);do{n.setEnd(o,n.endOffset+1)}while(-1==n.toString().indexOf(" ")&&""!=n.toString().trim()&&n.endOffset<o.length);n.toString().trim();e.focusNode.nodeValue=e.focusNode.nodeValue.replace(n.toString().trim(),"***")}); | |
// 2. Place your bookmark on your bookmarks bar | |
// 3. Push the button when you want to censor your name / anything else | |
// 4. Click on the word you want to hide | |
// Double-Click Version: | |
javascript:document.body.addEventListener("dblclick",function(t){for(var e=window.getSelection(),n=e.getRangeAt(0),o=e.anchorNode;0!=n.toString().indexOf(" ");)n.setStart(o,n.startOffset-1);n.setStart(o,n.startOffset+1);do{n.setEnd(o,n.endOffset+1)}while(-1==n.toString().indexOf(" ")&&""!=n.toString().trim()&&n.endOffset<o.length);n.toString().trim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
from datetime import datetime | |
from multiprocessing import Pool | |
def is_image(x): | |
return x.endswith('.jpg') or x.endswith('.png') | |
def is_movie(x): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests | |
import argparse | |
import json | |
""" | |
Example usage: | |
# From file | |
$ breaches --filename my_account_list |