Skip to content

Instantly share code, notes, and snippets.

View glats's full-sized avatar
😺
Im on #cat-v mostly

Juan Cuzmar glats

😺
Im on #cat-v mostly
View GitHub Profile
____________________________________________
Start of NVIDIA bug report log file. Please include this file, along
with a detailed description of your problem, when reporting a graphics
driver bug via the NVIDIA Linux forum (see devtalk.nvidia.com)
or by sending email to '[email protected]'.
nvidia-bug-report.sh Version: 21952221
Date: mar jun 6 22:16:40 -04 2017
@glats
glats / worker_gorutines.go
Created July 24, 2017 20:52
how rutine start and finish
package main
import (
"log"
"sync"
"time"
)
func startWorker(id int, jobs <-chan string, results chan<- error, wg *sync.WaitGroup) {
log.Printf("[+] Starting worker %v.\n", id)
@glats
glats / tail.sh
Created August 17, 2017 19:08
tail with color
tail -f /j2ee/log/serverneg.log |
sed -e 's/\(.*INFO.*\)/\o033[32m\1\o033[39m/' \
-e 's/\(.*ERROR.*\)/\o033[31m\1\o033[39m/'
@glats
glats / float.js
Created November 2, 2017 00:05
flaot gif
function moveit() { var newTop = Math.floor(Math.random()*350); var newLeft = Math.floor(Math.random()*1024); var newDuration = Math.floor(Math.random()*5000); jQuery('#float').animate({ top: newTop, left: newLeft, }, newDuration, function() { moveit(); }); } jQuery(document).ready(function() { jQuery("#float").show(); moveit(); });
@glats
glats / local.conf
Last active January 26, 2018 02:40
apache2 config
<VirtualHost *:80>
ServerName local.local
RewriteEngine on
ServerAdmin webmaster@localhost
DocumentRoot /home/glats/Documentos/vtr-frontend/frontend/WebContent
LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/vtr-error.log
CustomLog ${APACHE_LOG_DIR}/vtr-access.log combined
@glats
glats / docker_oracle.sh
Last active July 17, 2018 17:08
docker oracle
docker run -d -p 9000:8080 -p 1521:1521 -v /home/$USER/Documentos/oracle:/u01/app/oracle sath89/oracle-xe-11g
#!/bin/bash
# after git clone in the folder run:
dh_make --createorig # if tar.gz doesn't exists.
debuild -us -uc
#If you were following along, you’ll notice the package doesn’t build and returns the following error:
#install: cannot create regular file `/usr/local/bin/helloworld': Permission denied
#This is because debuild ran make install and failed because it did not have permissions to write to /usr/local/bin/ (hardcoded in our Makefile above).
#As you can imagine, most software will not package cleanly out of the box for reasons like the above. In such cases, a more specific debian/rules file will be needed. Let’s override the install directive of our Makefile during packaging in our debian/rules file:
@glats
glats / log.log
Last active February 18, 2018 03:21
log asus fan
[ 0.000000] microcode: microcode updated early to revision 0x80, date = 2018-01-04
[ 0.000000] Linux version 4.15.3-2-ARCH (builduser@heftig-19445) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Thu Feb 15 00:13:49 UTC 2018
[ 0.000000] Command line: initrd=\acpi_gpufix initrd=\intel-ucode.img initrd=\initramfs-linux.img root=PARTUUID=ed45a97e-11ae-4535-9d71-fb30af9de821 quiet vt.global_cursor_default=0 rd.loglevel=0 systemd.show_status=false rd.udev.log-priority=0 udev.log-priority=0 splash rw
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] Intel Spectre v2 broken microcode detected; disabling Speculation Control
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
@glats
glats / sensor3.conf
Created February 16, 2018 03:07
sensor conf
# libsensors configuration file
# -----------------------------
#
# This default configuration file only includes statements which do not
# differ from one mainboard to the next. Only label, compute and set
# statements for internal voltage and temperature sensors are included.
#
# In general, local changes should not be added to this file, but rather
# placed in custom configuration files located in /etc/sensors.d. This
# approach makes further updates much easier.
String stringJson = "[\"name\":\"something\"]";
ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
List<HashMap> listHashMap =
mapper.readValue(stringJson, new TypeReference<List<HashMap>>(){});