Skip to content

Instantly share code, notes, and snippets.

@sudocurse
sudocurse / fd.py
Last active Oct 15, 2019
macos file limit is 256. why do i see 252?
View fd.py
import tempfile
files = []
while True:
try:
file = tempfile.TemporaryFile()
print("Created file:", file, file.name)
files.append(file)
except OSError:
@kevinwang09
kevinwang09 / DropletUtils_install.log
Last active Oct 15, 2019
Installing DropletUtils in Docker
View DropletUtils_install.log
> install("DropletUtils")
Bioconductor version 3.10 (BiocManager 1.30.7), R 3.6.1 (2019-07-05)
Installing package(s) 'DropletUtils'
trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/DropletUtils_1.5.10.tar.gz'
Content type 'application/x-gzip' length 446056 bytes (435 KB)
==================================================
downloaded 435 KB
* installing *source* package ‘DropletUtils’ ...
** using staged installation
@gp42
gp42 / spotify.rb
Created Oct 15, 2019
Get Spotify info to tmux
View spotify.rb
#!/usr/bin/env ruby
# Return a short string with spotify status
require 'json'
sym = {
:play => '',
:pause => ''
}
@tbutts
tbutts / tmux-migrate-options.py
Last active Oct 15, 2019
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
View tmux-migrate-options.py
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@Indexyz
Indexyz / history.json
Last active Oct 15, 2019
XiaomiKernel
View history.json
["README","andromeda-p-oss","armani-jb-oss","armani-kk-oss","begonia-p-oss","cactus-o-oss","cactus-p-oss","cancro-kk-oss","cancro-m-oss","cappu-n-oss","cepheus-p-oss","clover-o-oss","daisy-o-oss","daisy-p-oss","davinci-p-oss","dior-kk-oss","dipper-o-oss","dipper-p-oss","ferrari-l-oss","gemini-m-oss","ginkgo-p-oss","grus-p-oss","gucci-kk-oss","hennessy-l-oss","hydrogen-m-oss","ido-l-oss","jasmine-o-oss","jasmine-p-oss","jason-n-oss","jason-p-oss"]
View Arduino Experiments
Reference Links
https://www.arduino.cc/reference/en/
1 ) Analog Signals
Read / Write
View correios-bugfix.php
<?php
class ModelShippingCorreios extends Model {
private $valor_max = 10000; // máximo valor declarado, em reais
private $altura_max = 105; // todas as medidas em cm
private $largura_max = 105;
private $comprimento_max = 105;
private $altura_min = 2;
View add_batch.java
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class add_batch {
public static void main(String [] args) {
try {
Class.forName("oracle.jdbc.OracleDriver");
System.out.println("Sucessfully loaded drivers");
View git remote show origin
* remote origin
Fetch URL: ssh://site.com/html/repo.git
Push URL: ssh://site.com/html/repo.git
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
@danramosd
danramosd / git remote show origin
Created Feb 23, 2011
git remote show origin
View git remote show origin
* remote origin
Fetch URL: ssh://site.com/html/repo.git
Push URL: ssh://site.com/html/repo.git
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
You can’t perform that action at this time.