Skip to content

Instantly share code, notes, and snippets.

0xFc571a5fA85fd82393FbD3Ff9d74583a000C174c
git config --global credential.helper store
echo "https://${GITHUB_TOKEN}:x-oauth-basic@github.com" >> ~/.git-credentials
@lsgrep
lsgrep / go-ci-build.sh
Created July 18, 2017 07:56 — forked from wavded/go-ci-build.sh
Go Jenkins CI Script - golang
#!/bin/bash
# Go build script that runs cloc, cpd, lint, vet, test and coverage for Jenkins
#
# Outside tools include:
# gocov: go get github.com/axw/gocov
# gocov-xml: go get github.com/t-yuki/gocov-xml
# go2xunit: go get bitbucket.org/tebeka/go2xunit
# jscpd: npm i jscpd -g
# cloc: npm i cloc -g
@lsgrep
lsgrep / discover-pci-slot-type-linux
Created July 16, 2017 05:12 — forked from antonioams/discover-pci-slot-type-linux
How to discover PCI Slot Type in a Linux Server
[root@local ~]# dmidecode | grep -A 5 "System Slot"
System Slot Information
Designation: PCI1
Type: x4 PCI Express Gen 2 x8
Current Usage: Available
Length: Long
Characteristics:
--
System Slot Information
Designation: PCI2
@lsgrep
lsgrep / cljs clj
Last active July 19, 2022 21:28
reagent input with Chinese characters
;reagent input two way binding with chinese characters .
;reagent 中文输入问题
@lsgrep
lsgrep / gist:2f60125284b26caa64ff
Created December 7, 2015 12:30
push to all repos
git remote | xargs -L1 git push --all
@lsgrep
lsgrep / gist:bd31d11a96dcf17ddb42
Created October 1, 2015 04:18
emacs essentials
File Handling Commands
C-x C-v find-alternate-file Read a different file.
C-x i insert-file Insert a file at the cursors position.
C-x C-w write-file Write the contents of the buffer to a file.
C-z suspend-emacs Suspend emacs.
(defun clojure-test-filename ()
(concat (projectile-project-root)
"test/"
(mapconcat #'identity
(butlast (split-string (cider-current-ns) "\\.")) "/")
"/"
(file-name-nondirectory (file-name-sans-extension (buffer-file-name)))
"_test.clj"))
gsutil -o GSUtil:parallel_composite_upload_threshold=150M cp bigfile gs://your-bucket
mysqldump --databases hypr -h blah-blah.rds.amazonaws.com -u hypr -P 3306 -p > rds.sql