This file contains 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
''' | |
Big thanks and inspiration from : https://github.com/mfurlend/shp2png | |
Addapted to have: | |
- random fill color | |
- shapeType = Points to pentagone | |
''' | |
import shapefile, math | |
import Image, ImageDraw |
This file contains 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
git config --global alias.chb 'chb = !sh -c "git branch -a | grep $1 | head -n 1 | cut -d/ -f3- | xargs git checkout"' | |
git chb 1085 # Example |
This file contains 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
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme | |
index 07546fd..e6dec73 100644 | |
--- a/themes/agnoster.zsh-theme | |
+++ b/themes/agnoster.zsh-theme | |
@@ -80,7 +80,7 @@ prompt_end() { | |
# Context: user@hostname (who am I and where am I) | |
prompt_context() { | |
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then | |
- prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" | |
+ prompt_segment black default "%(!.%{%F{yellow}%}.)$USER:" |
This file contains 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 ruby | |
file_path = ARGV.first | |
puts '' | |
unless file_path | |
puts 'You must provide a file path' | |
puts ' Ex: ruby add_frozen_string.rb /path/to/file.rb' | |
exit 1 | |
end |
This file contains 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
[alias] | |
s = status | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
uncommit = !git reset --soft HEAD~1 && git s | |
discard-all = !git add . && git reset --hard | |
publish = !git push --set-upstream origin $(git branch-name) | |
chb = !sh -c \"git branch -a | grep $1 | head -n 1 | cut -d/ -f3- | xargs git checkout\" | |
nb = checkout -b | |
c = checkout | |
cm = !git add . && git commit -m |
This file contains 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_relative 'user' | |
require_relative 'user_serializer' | |
user = User.new('Hello', 'World', '21') | |
puts UserSerializer.new(user).serialize | |
# => {:display_name=>"Hello World", :age=>"21 years old"} |
This file contains 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
# Fur Elise | |
# Note by note | |
use_bpm 40 | |
use_synth :piano | |
# Partie 1 >> | |
play :E5, amp: 4 | |
sleep 1/8.0 | |
play :Ds5 |
This file contains 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
version: '2.2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2 | |
environment: | |
- node.name=elasticsearch | |
- discovery.type=single-node | |
- xpack.security.enabled=false | |
- xpack.monitoring.enabled=false | |
- bootstrap.memory_lock=true |
This file contains 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
# frozen_string_literal: true | |
files_path = `git diff --name-only origin/master..` | |
files_path = files_path.split("\n").select { |f| f.end_with?('.rb') } | |
METHODS = %w( | |
<< | |
.push | |
.gsub! | |
.concat |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
<meta name="theme-color" content="#000000"/> | |
<meta name="description" content="Reveal JS Presentation"/> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.0/reveal.min.css"/> |