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
ATTRS{idVendor}=="060b", ATTRS{idProduct}=="5252", OWNER="pof" | |
ACTION=="add", RUN+="/usr/local/bin/usb-keyboard-udev in" | |
ACTION=="remove", RUN+="/usr/local/bin/usb-keyboard-udev out" |
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
def infer_type_season_and_episode! | |
# try to detect episode number | |
tome_chapter_matcher = /(?>\bT(?>ome)?[\s\.]*(?<tome>[0-9]+)\b)?[\s\.]*\bCh(?>apitre|apter)?[\s\.]*(?<chapter>[0-9]+)\b/i | |
season_episode_matcher = /\b(S(?>eason|aison)?[\s\.]*(?<season>[0-9]+)[\s.]*)?(E|É)(?>pisode|p)?[\s\.]*(?<episode>[0-9]+)\b/i | |
simple_episode_matcher = /(?>#{::Regexp.escape(self.feed.try(:title))}\s*\#?|\#\s*|°\s*|(É|E)(?>pisode|p)[\s\.]*)(?<episode>[0-9]+)\b(?>$|\.?\s+|\:)/i | |
_tome = _chapter = _season = _episode = 0 | |
tome_chapter_match = tome_chapter_matcher.match(self.title) | |
if tome_chapter_match |
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 | |
{ echo -e "\n# $(basename "$PWD")\n" ; sed -e 's/#.*$//' -e '/^$/d' modman | awk '{ print $2 }' } # >> ../../htdocs/.gitignore |
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/sh | |
gem install -v 1.5.2 racc | |
gem install -v 1.10.10 nokogiri | |
gem install -v 1.19.2 parallel | |
gem install -v 0.39.17 solargraph |
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
// Open memories_history.html, and open the developer console, paste this code : | |
function download(filename, text) { | |
var element = document.createElement("a"); | |
element.setAttribute( | |
"href", | |
"data:text/plain;charset=utf-8," + encodeURIComponent(text) | |
); | |
element.setAttribute("download", filename); |
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
# inspired by https://gist.github.com/joeyAghion/6511184 | |
function getReadableFileSizeString(fileSizeInBytes) { | |
var i = -1; | |
var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']; | |
do { | |
fileSizeInBytes = fileSizeInBytes / 1024; | |
i++; | |
} while (fileSizeInBytes > 1024); |
OlderNewer