For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
<?php | |
# xxx/yyyBundle/Command/AddFulltextIndexesCommand.php | |
/** | |
* AddFulltextIndexesCommand.php | |
* | |
* @author Jérémy Hubert <jeremy.hubert@infogroom.fr> | |
* @since lun. 26 sept. 2011 09:23:53 | |
*/ | |
namespace xxx\yyyBundle\Command; |
To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo
if you're logged in as root.
Edit /etc/ssh/sshd_config
and make sure to add the following at the end of the file:
Match group filetransfer
ChrootDirectory %h
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
$ redis-cli | |
> config set stop-writes-on-bgsave-error no |
<!-- Drop this in ~/Library/Preferences/PyCharm20/tools --> | |
<!-- make sure you set the path to flake8 executable for your machine in the COMMAND option --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<toolSet name="Flake8"> | |
<tool name="Flake8 File" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="/usr/local/share/python/flake8" /> | |
<option name="PARAMETERS" value="--max-line-length=120 --ignore=E301,E302,E261,E262,W404 $FileDir$/$FileName$" /> | |
<option name="WORKING_DIRECTORY" value="$FileDir$" /> |
#!/usr/bin/env python | |
import ctypes | |
import os | |
import time | |
import sys | |
class XScreenSaverInfo(ctypes.Structure): | |
""" typedef struct { ... } XScreenSaverInfo; """ | |
_fields_ = [('window', ctypes.c_ulong), # screen saver window | |
('state', ctypes.c_int), # off,on,disabled |
SELECT | |
'access_' || replace(m.model, '.', '_') as id, | |
m.model as name, md.module ||'.'||'model_' || replace(m.model, '.', '_') as "model_id:id", | |
coalesce(gd.module ||'.', '') || g.name as "group_id:id", | |
a.perm_read::int as perm_read, | |
a.perm_write::int as perm_write, | |
a.perm_create::int as perm_create, | |
a.perm_unlink::int as perm_unlink | |
FROM | |
ir_model_access a |
#! /bin/sh | |
# Produce a squash-commit patch from a branch of changes | |
MASTER=$1 | |
PATCHBRANCH=$2 | |
SQUASHBRANCH="$PATCHBRANCH-squash" | |
MESSAGE=$3 | |
git checkout -b $SQUASHBRANCH $MASTER && | |
git merge --squash $PATCHBRANCH && | |
git commit -a -m "$MESSAGE" && |