Skip to content

Instantly share code, notes, and snippets.

View blancosj's full-sized avatar

uranio blancosj

  • NJ
View GitHub Profile
@bvulaj
bvulaj / SecurityConfiguration.java
Last active December 15, 2020 16:38
Multiple Oauth2 Providers in Spring Security
@Autowired
private FacebookPrincipalExtractor facebookPrincipalExtractor;
@Autowired
private FacebookAuthoritiesExtractor facebookAuthoritiesExtractor;
@Autowired
private GooglePrincipalExtractor googlePrincipalExtractor;
@Autowired
private GoogleAuthoritiesExtractor googleAuthoritiesExtractor;
@Bean
@alexanderjsingleton
alexanderjsingleton / README.md
Last active December 6, 2023 23:49
Bitcoin mining with Raspberry Pi and Slushpool

After spinning-up your Raspberry Pi and registering an account at slushpool:

  1. sudo apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++ git
  2. git clone https://github.com/tpruvot/cpuminer-multi
  3. cd cpuminer-multi
  4. ./autogen.sh
  5. ./build.sh
  6. Check out the commands: ./cpuminer --help
  7. ./cpuminer -u slashpool_user_name.slashpool_worker -p pass -a sha256d -o stratum+tcp://stratum.slushpool.com:3333 -t cputhreads
  8. Order MOAR Raspberry Pi's and Antminers then buy more Bitcoin.
@troyfontaine
troyfontaine / readme.md
Last active July 22, 2024 09:21
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This process requires that you are able to ssh OR log in locally using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customization-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and swap.

NOTE: If you want to be sure that nothing is writing to /home you can either modify the host to boot into single-user mode OR try to use the systemctl isolate runlevel1.target command to switch (not tested! should work).

@FedericoPonzi
FedericoPonzi / big-o-java-collections.md
Last active July 11, 2024 05:45
Big O notation for java's collections

The book Java Generics and Collections has this information (pages: 188, 211, 222, 240).

List implementations:

                      get  add  contains next remove(0) iterator.remove
ArrayList             O(1) O(1) O(n)     O(1) O(n)      O(n)
LinkedList O(n) O(1) O(n) O(1) O(1) O(1)
@linuxsimba
linuxsimba / docker-compose.yml
Last active November 2, 2023 10:09
docker-compose for setting up gitlab
version: '2'
networks:
gitlab_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.201.0/24
gateway: 192.168.201.1
@sharmaeklavya2
sharmaeklavya2 / cp_syllabus.md
Last active July 23, 2024 03:38
Competitive Programming Syllabus

Competitive Programming Syllabus

Geometry

  • Problems - Refer the article for a list of problems which can be solved using Rotating Calipers technique.
@daicham
daicham / .gitlab-ci.yml
Last active May 3, 2023 07:05
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
@jonashackt
jonashackt / bash
Last active December 1, 2021 01:45
Remote debugging Spring Boot
### java -jar
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar
### Maven
Debug Spring Boot app with Maven:
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"
@RobinBuschmann
RobinBuschmann / 01_websockets_nginx.config
Created April 12, 2016 12:56 — forked from raulanatol/01_websockets_nginx.config
Configure nginx to accept websockets on AWS Elastic Beanstalk
files:
"/etc/nginx/conf.d/01_websockets.conf":
mode: "000644"
owner: root
group: root
content: |
upstream nodejs {
server 127.0.0.1:8081;
keepalive 256;
}
@topheman
topheman / .vimrc
Last active March 9, 2024 09:48
vim-config on Mac OS X
" Vundle config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')