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
| # disconect the device | |
| # run this command (provide a password it it asks for) | |
| sudo killall -STOP -c usbd | |
| # reconnect the device and it should work |
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
| var executing: Bool { get } // true if the receiver is executing, otherwise false. | |
| var finished: Bool { get } //true if the receiver has finished execution, otherwise false. | |
| var cancelled: Bool { get } //true if the receiver has been cancelled, otherwise false. | |
| var objDS= DeviceStatus() | |
| let thread: NSThread = NSThread(target: objDS, selector: "checkDeviceStatus", object: nil) | |
| if thread.executing{ | |
| println("executing") |
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
| # edit /opt/retropie/configs/all/autostart.sh | |
| # to call our script before emulation start | |
| if test -e "/home/pi/userdata/retropie-custom.sh"; then | |
| bash /home/pi/userdata/custom.sh $1 & | |
| fi | |
| emulationstation #auto |
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
| [ | |
| { | |
| "id": "0f37d5a80f6794f64d753ea1cefa6d26", | |
| "_insertTimestamp": "2020-01-08 23:00:09.001 UTC", | |
| "retailer": "Amazon-UK", | |
| "productNo": "B07NW1JCK3", | |
| "username": "Tomás Montenegro, Belo Horizonte - MG", | |
| "rating": 5.0, | |
| "subject": "Fantástico!!!", | |
| "content": "Tortas deliciosas. Os waffles também estavam muito bons. Equipe muito atenciosa. :)", |
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
| import AppKit | |
| let currentDirectoryURL = URL(fileURLWithPath: FileManager.default.currentDirectoryPath) | |
| let imageURL = URL(fileURLWithPath: "logo.png", relativeTo: currentDirectoryURL) | |
| let args = ProcessInfo.processInfo.arguments | |
| let appVersion = args[1] | |
| func write(_ text: String, on image :NSImage) -> NSImage |
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
| ffmpeg -i logo.png -vf drawtext="fontfile=SourceCodePro-Bold.ttf: \ | |
| text='Letro rules': fontcolor=black: fontsize=24: box=1: boxcolor=yellow@1.0: \ | |
| boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2/2/2" -codec:a copy logo-txt.png | |
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
| # | |
| # VIDEO / IMAGE RELATED | |
| # | |
| # requires: ffmpeg | |
| # tip: put this funcion on your ~/.profile file | |
| # | |
| # Compress video files while keep their quality |
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
| # file: .tmux.conf | |
| set -g default-terminal "tmux-256color" | |
| set -ga terminal-overrides ",*256col*:Tc" | |
| # file: .vimrc | |
| if exists('+termguicolors') | |
| let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" | |
| let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" |
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
| function write_gpio_unsigned(num,pin_index,bits) | |
| local lastbit_i = | |
| 0x5f80+pin_index+bits-1 | |
| local mask = 1 | |
| for j=0,bits-1 do | |
| local bit = shr(band(num, mask), j) | |
| poke(lastbit_i-j, bit*255) | |
| mask = shl(mask, 1) | |
| end |
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
| { | |
| "code": 200, | |
| "deals":[ | |
| { | |
| "cashback":{ | |
| "horarios":[ | |
| { | |
| "start":"06:00", | |
| "end":"07:00" | |
| }, |