Skip to content

Instantly share code, notes, and snippets.

View SansGuidon's full-sized avatar
Curious mind reading about everything

SansGuidon SansGuidon

Curious mind reading about everything
  • Zoemp
View GitHub Profile
@SansGuidon
SansGuidon / bookmarklet_alternativeto.js
Last active February 28, 2022 16:45
Is there an alternative to current service (website) ?
javascript:(function(){if(location.href.indexOf('http')!=0){input=prompt('URL:','http://');if(input!=null){location.href='http://web.archive.org/web/*/'+input}}else{location.href='https://alternativeto.net/browse/search/?q=%27+window.location.hostname.replace("www.","").split(".")[0];}})();
@SansGuidon
SansGuidon / bookmarklet_hackernews.js
Created February 21, 2022 08:59
Is the current article debated on hacker news ?
javascript:(function(){if(location.href.indexOf('http')!=0){input=prompt('URL:','http://');if(input!=null){location.href='https://hn.algolia.com/?q=%27+input}}else{location.href=%27https://hn.algolia.com/?q=%27+location.href;}})();
@SansGuidon
SansGuidon / bookmarklet_archive.js
Created February 21, 2022 08:57
Is the current website archived ?
javascript:(function(){if(location.href.indexOf('http')!=0){input=prompt('URL:','http://');if(input!=null){location.href='http://web.archive.org/web/*/'+input}}else{location.href='http://web.archive.org/web/*/'+location.href;}})();
@SansGuidon
SansGuidon / .vimrc
Last active April 10, 2023 10:57
Validating Jenkinsfile in Vim and/or using CLI / terminal
" ~/.vimrc
" ...
" Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support
Plugin 'dense-analysis/ale'
" ...
" dense-analysis/ale options
let g:ale_history_log_output = 1
let g:ale_use_global_executables = 1
@SansGuidon
SansGuidon / Dockerfile
Last active February 13, 2020 23:39
SWI-Prolog and Logtalk on CentOS/RHEL 7
FROM centos
RUN yum groupinstall -y "Development Tools" \
&& yum -y install epel-release \
&& yum clean all
RUN yum -y install \
git \
ninja-build \
libunwind \
freetype-devel \
gmp-devel \
@SansGuidon
SansGuidon / crowd_addusers.sh
Last active October 29, 2019 11:00
Manage users using crowd REST API
#!/usr/bin/env bash
while read user; do
echo $user
curl -u '<crowdapplogin>:<crowdapppassword>' --header "Content-Type: application/json" -d "{\"name\": \"$user\"}" "https://<crowdhost>/rest/usermanagement/1/group/user/direct?groupname=jira-users&username=$user"
done < usersnameslist
@SansGuidon
SansGuidon / export.js
Last active October 15, 2018 17:01
Export Google Inbox links
console.table(
[]
.concat(Array.prototype.slice.call(document.getElementsByClassName('bX')))
.concat(Array.prototype.slice.call(document.getElementsByClassName('bV dj')))
.map(
function(i){
if (i.href)
return decodeURIComponent(i.href.replace(/^.*url\?q=([^&]*)&.*$/,'$1'))
}
))
@SansGuidon
SansGuidon / .bashrc
Created September 18, 2018 10:37
.bashrc on windows for python 3.6.3
export PATH=/C/Python36:/C/Python36/Scripts:$PATH
@SansGuidon
SansGuidon / README.md
Created August 22, 2018 07:49 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
@SansGuidon
SansGuidon / readme.md
Last active April 7, 2018 09:25
Simple notes taking + cheatsheet