🎯
- GitHub Staff
- https://fjcasas.es
- @[email protected]
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
-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:ThreadPriorityPolicy=1 -XX:AllocatePrefetchStyle=3 -XX:+UseZGC -XX:AllocatePrefetchStyle=1 -XX:-ZProactive -XX:+UseZGC -XX:AllocatePrefetchStyle=1 -XX:-ZUncommit -XX:+ZGenerational |
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
# Build the test command allowing to overwrite some of the options. | |
TEST_FLAGS?=-v -race -count 1 -timeout 3s | |
TEST_ARGS?=./... | |
GO_TEST=go test $(TEST_FLAGS) | |
.PHONY: test | |
test: | |
$(GO_TEST) $(TEST_ARGS) |
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
// This is not at all like tail. Will fail in many scenarios but it was funny to write it :) | |
use std::fs::File; | |
use std::io::prelude::*; | |
use std::io::{BufReader, SeekFrom}; | |
use std::thread::sleep; | |
use std::time::Duration; | |
fn main() { | |
let file_name = "some_file.log"; | |
let file = File::open(file_name.clone()).unwrap(); |
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
irb(main):001:0> h = Hash.new([]) | |
=> {} | |
irb(main):002:0> h[:hello] << :fran | |
=> [:fran] | |
irb(main):003:0> h[:hallo] << :andreas | |
=> [:fran, :andreas] | |
irb(main):004:0> h | |
=> {} | |
irb(main):005:0> h[:asdf] | |
=> [:fran, :andreas] |
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
# Config for a dev app with rails + webpacker | |
[http] | |
[http.routers] | |
[http.routers.https-to-webpack-dev-server] | |
rule = "Host(`domain.dev`) && PathPrefix(`/sockjs-node`)" | |
service = "webpack-dev-server" | |
entrypoints = ["https"] | |
priority = 2 | |
[http.routers.https-to-webpack-dev-server.tls] |
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: '3' | |
services: | |
proxy: | |
image: traefik:v2.0 # The official Traefik docker image | |
network_mode: host # Allows traefik to talk to your host machine | |
ports: | |
- "80:80" | |
- "443:443" | |
- "8080:8080" # The Web UI | |
volumes: |
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
# If a spec in the suite is marked with focus on the CI it will fail. | |
RSpec::Matchers.define :have_no_focus do | |
match { |ex| !ex.metadata[:focus] } | |
failure_message(&:inspect) | |
end | |
RSpec.configure do |config| | |
config.before(:each) do |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
<!-- ~/.config/fontconfig/fira-code.conf --> | |
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="pattern"> | |
<test qual="any" name="family"><string>monospace</string></test> | |
<edit name="family" mode="assign" binding="same"><string>Fira Code</string></edit> | |
</match> | |
</fontconfig> |
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
content = """ | |
hello! | |
""" | |
assert content == "hello!\n" | |
content = """ | |
hello!\ | |
""" |
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
" A couple of nice things your vim can use when you're dealing with unicode text. | |
" Taken from https://stackoverflow.com/questions/16987362/how-to-get-vim-to-highlight-non-ascii-characters | |
" Highlight all non ascii characters | |
syntax match nonascii "[^\x00-\xFF]" | |
highlight nonascii guibg=Red ctermbg=2 | |
" Find any non ascii character | |
nnoremap <leader>na /[^\x00-\xFF]<CR> |
NewerOlder