Skip to content

Instantly share code, notes, and snippets.

View dbrrt's full-sized avatar
🚲

David Barrat dbrrt

🚲
  • Switzerland
  • 11:01 (UTC +01:00)
View GitHub Profile
@eculver
eculver / Python SMTP server one-liner
Created October 27, 2009 16:54
Python SMTP server one-liner
python -m smtpd -n -c DebuggingServer localhost:1025
@nachiket-p
nachiket-p / meteor_servercall.html
Created June 21, 2012 07:41
Meteor: Calling server method from client
<head>
<title>meteor_servercall</title>
</head>
<body>
{{> simple}}
{{> passData}}
</body>
<template name="simple">
@cobyism
cobyism / gh-pages-deploy.md
Last active November 8, 2025 17:19
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@arunoda
arunoda / gist:7790979
Last active October 20, 2025 08:27
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@emeeks
emeeks / README.md
Last active December 17, 2022 14:52
d3.svg.legend example

d3.svg.legend provides for a simple legend that can be displayed horizontally or vertically and accepts a few different d3 scale types.

# Manually secure port 6379
sudo iptables -A INPUT -p tcp --dport 6379 -s xxx.xxx.xxx.xxx -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 6379 -j DROP
sudo iptables -L
# Save current firewall config
sudo iptables-save > /etc/iptables.conf
# Load iptables.conf on startup
sudo nano /etc/rc.local
@nylki
nylki / char-rnn recipes.md
Last active November 18, 2024 13:19
char-rnn cooking recipes

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.

@hofmannsven
hofmannsven / README.md
Last active August 12, 2022 19:09
Notes on working with Tableau Server APIs
@twang2218
twang2218 / PentaxScsiProtocol.md
Last active February 25, 2020 20:09
This is the Pentax SCSI protocol

Pentax Camera SCSI protocol

  1. General

To control the Pentax camera, the camera has to be set to Mass Storage (MSC) mode, rather than PTP mode.

Vendor specific SCSI command is used to communicate with Pentax camera.