ohneconker

勾践知道自己今晚就要死了。

世界在旋转。卿士们塌前讨论自己身后颂文的声音听起来遥远得不真实。

“...灭吴兴越,推行五政,北上称霸...”

模糊的字句传入他的耳中,勾践的思绪也回到了自他重新成为王之后的一切。

诛杀吴王。吞并吴国。在这乱世之中向上爬到中原霸主地位。

在后面漫长的六十年中,那个人只入梦过三次。第一次她以初见模样与他在养鹤涧河边闲聊嬉戏。第二次她身披王服与他割袍断义。第三次她与他战场对峙,她决绝在他怀中死去。

今晚是第四次。

水涧边,她的背影若隐若现。

而他愣在当场,迈不出哪怕是一步。

“阿玉!”

背影化为清水流入河涧。

绵长的痛楚从胸口蔓延全身。他甚至发不出一点声音。

在做为一个人之前,他首先是一个国家的王。阿玉则是他称王路上必须舍弃的牺牲。

他这样开导自己。

一个熟悉的阴柔声音在他背后响起:“如果我说你可以同时得到姬吴小妹和越国霸业呢?”

是早应该消逝在世间的邪神龙王。

龙王轻声蛊惑:“我可以送你回到一切还未开始的时候。你可以抢占先机将疆土扩展得更广阔。你可以与吴家小妹重新开始,不再错过她。只要你与我立下盟约。”

那宿命的一战后,勾践冰封住自己的心,专注地追逐着自己的野心。

当初的爱与挣扎,恨与折磨在接连不断的权力争斗逐渐钝化,即使偶尔想起她也不再有针刺的疼痛。但也许是弥留之际人的软弱,或者是一直勾心斗角的乏味疲惫,苦涩不甘再次像海浪一样一阵一阵地捶打过来。

勾践有一瞬间的动摇。

但也只是一瞬间。

“诛龙神乃是腾玉毕生心愿。寡人断断不会协助你再次降临人间。将死之物就该安分守己!”

龙王并不气馁。他眼中闪着奇异的光,梦中夜色平静的养鹤涧泛起了不详的红色。

“只怕你没得选。”

随即勾践眼前一黑。

勾践再醒来时发现自己回到了六十多年前的养鹤涧。他正躺在青草上,沐浴在午后树荫下细碎阳光中。在他身边阿玉也躺在青草地上,手遮着双眼正打着盹。

不远处堆着她带的一篮子点心、他捕获的河鱼。旁边还有一个树枝架起的简易烤架。

此时他还是一个战败被囚的君王,一个吴国人人都可欺辱的奴仆,而阿玉是他唯一的朋友。

多年未曾想起的人重新出现在他面前,他惊奇地发现在时间的冲刷下她并没有被淡化忘却。

她的傲气,她的骨气,她的正直。

他的怦然心动。即使心已垂垂老矣,记忆与感受依然鲜明如昨日。

此时二人之间的国恨家仇还未显露,只有他当时未察觉的朦胧初动的爱慕隐隐约约地流淌。

阿玉缓缓睁眼,歪头看向他:“等你捉鱼时不知不觉睡着了。我睡了多久?”

此时的她温柔如美梦。

心中百般柔肠忧愁,他义无反顾地吻上她惊讶张开的的唇。

“阿玉,我心悦与你。”

惊讶过后,她的脸上很快变成他熟悉的冷静自制:“你从什么时候知道的?”

这话问得没头没尾的,但是勾践听懂了她的意思。

“虎丘第二次见面时我就知道你是女子了。”

现在想来,他强盛巅峰时期的阴谋阳谋如过眼云烟,人生中最难忘的日子反而是这为奴为仆、有她作伴的这三年。

不过马上齐国公子就要在吴国国都内被掳、伍员要杀他拿他顶罪。他则被迫叫破阿玉身份。二人如早春河上浮冰般的友谊融化消散在暗流涌动中。

还有如同诅咒般自祖辈代代相传至今时的国恨家仇。

他注定站在对立面的一生所爱。

但是即使如此...即使如此!

“哈哈哈哈哈,你果然依旧选择站在我这边。”

在虎山山巅一处隐秘的山林中,龙王大笑着现身。

勾践冷冷地盯着他。

“伍员和夫差已经察觉到了什么。我们得快点动作。”

龙王不在意同谋者的沉默,继续盘算着他的复活计划。

“东西带来了吗?”

勾践从怀中掏出一柄造型古朴的剑。

龙王伸手去抽拿越王剑。剑在勾践手中纹丝不动。

勾践直视龙王双眼:“你我依旧只是各取所需。”

说完这句话他才松手任由古剑落入龙王手中,转身离去。

被迫重来一次,他被波涛汹涌的命运卷席着奔向命运的尽头。

龙王也和他一样带着记忆重回此世。阿玉将陷入更大的被动中。如果有一步踏错,阿玉将重蹈上一辈子的战场身死。

而她的死甚至很有可能会是白费功夫。龙王依旧会逍遥在外吸取人间怨气鬼气,直到他能吞下整个人间。

但他此时命还捏在吴国相国和她的手中。如果没有龙王从中干扰,恐怕很快伍员会识破他之前的安排与计谋,借机将他拿下发落。

他与阿玉此时的情谊虽然看似深厚,在他尚且无筹码与她在明面上周旋、证据又确凿的情况下,她必然会狠下心将他当场处决。

以她性格之烈,说不定还会亲自砍下他的头。

即使他们才刚互诉衷肠情意相通。

勾践悲哀地发现,再次重头来过只是在重演那些伤痛。

心意相通没过几日,他依旧真心假意地百般算计了阿玉、设法顺势逼死伍员、与龙神暗度陈仓壮大越国吞吴北上。

由于这一次他提前捅破了那张纸,一切甚至都提前加快了。

他又回到了那场噩梦般的姑苏战场。

User-agent: BoardReader
User-agent: BoardTracker
User-agent: Gigabot
User-agent: Twiceler
User-agent: dotbot
User-agent: Baidu
User-agent: Baiduspider
User-agent: Baiduspider-video
User-agent: Baiduspider-image
User-agent: NaverBot
User-agent: Sosospider
User-agent: Yandex
User-agent: YoudaoBot
User-agent: Yeti
User-agent: proximic
User-agent: sogou
User-agent: sogou spider
User-agent: Sogou web spider
Disallow: /

User-agent: Mediapartners-Google*
Disallow:

User-agent: *
Disallow: /@faketaoist
Disallow: /@faketaoist$

.. (idem for the other users

和官方教程一模一样,除了.envdocker-compose.yml:

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY=OhGezuz2021

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG=false

USE_HTTPS=true

DOMAIN="你的域名"
EMAIL=你的站长邮箱

# Used for deciding which editions to prefer
DEFAULT_LANGUAGE="English"

## Leave unset to allow all hosts
# ALLOWED_HOSTS="localhost,127.0.0.1,[::1]"

MEDIA_ROOT=images/

OL_URL=https://openlibrary.org

## Database backend to use.
## Default is postgres, sqlite is for dev quickstart only (NOT production!!!)
BOOKWYRM_DATABASE_BACKEND=postgres

MEDIA_ROOT=images/

POSTGRES_PORT=5432
POSTGRES_PASSWORD="你的Postgres密码"
POSTGRES_USER=fedireads
POSTGRES_DB=fedireads
POSTGRES_HOST=db

# Redis activity stream manager
MAX_STREAM_LENGTH=200
REDIS_ACTIVITY_HOST=redis_activity
REDIS_ACTIVITY_PORT=6380
REDIS_ACTIVITY_PASSWORD="你的redis密码"

# Redis as celery broker
REDIS_BROKER_PORT=6379
REDIS_BROKER_PASSWORD=你的redis密码
#CELERY_BROKER=redis://:${REDIS_BROKER_PASSWORD}@redis_broker:${REDIS_BROKER_PORT}/0
#CELERY_RESULT_BACKEND=redis://:${REDIS_BROKER_PASSWORD}@redis_broker:${REDIS_BROKER_PORT}/0

FLOWER_PORT=8888
FLOWER_USER=你的花花用户名
FLOWER_PASSWORD="你的花花密码"

EMAIL_HOST="smtp.eu.mailgun.org"
EMAIL_PORT=587
EMAIL_HOST_USER=mail@域名.com
EMAIL_HOST_PASSWORD=你的这个mail@域名 的密码
EMAIL_USE_TLS=true
EMAIL_USE_SSL=false

# Set this to true when initializing certbot for domain, false when not
CERTBOT_INIT=false

# Thumbnails Generation
ENABLE_THUMBNAIL_GENERATION=false

# S3 configuration
USE_S3=false
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

# Commented are example values if you use a non-AWS, S3-compatible service
# AWS S3 should work with only AWS_STORAGE_BUCKET_NAME and AWS_S3_REGION_NAME
# non-AWS S3-compatible services will need AWS_STORAGE_BUCKET_NAME,
# along with both AWS_S3_CUSTOM_DOMAIN and AWS_S3_ENDPOINT_URL

# AWS_STORAGE_BUCKET_NAME=        # "example-bucket-name"
# AWS_S3_CUSTOM_DOMAIN=None       # "example-bucket-name.s3.fr-par.scw.cloud"
# AWS_S3_REGION_NAME=None         # "fr-par"
# AWS_S3_ENDPOINT_URL=None        # "https://s3.fr-par.scw.cloud"


# Preview image generation can be computing and storage intensive
# ENABLE_PREVIEW_IMAGES=True

# Specify RGB tuple or RGB hex strings,
# or use_dominant_color_light / use_dominant_color_dark
PREVIEW_BG_COLOR=use_dominant_color_light
# Change to #FFF if you use use_dominant_color_dark
PREVIEW_TEXT_COLOR="#363636"
PREVIEW_IMG_WIDTH=1200
PREVIEW_IMG_HEIGHT=630
PREVIEW_DEFAULT_COVER_COLOR="#002549"

docker-compose.yml

version: '3'

services:
  nginx:
    image: nginx:latest
    ports:
      - 8001:8001
    depends_on:
      - web
    networks:
      - main
    volumes:
      - ./nginx:/etc/nginx/conf.d
      - static_volume:/app/static
      - media_volume:/app/images
  db:
    build: postgres-docker
    env_file: .env
    entrypoint: /bookwyrm-entrypoint.sh
    command: cron postgres
    volumes:
      - pgdata:/var/lib/postgresql/data
      - backups:/backups
    networks:
      - main
    ports:
      - 5433:5432
  web:
    build: .
    env_file: .env
    command: gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:8000
    volumes:
      - .:/app
      - static_volume:/app/static
      - media_volume:/app/images
    depends_on:
      - db
      - celery_worker
      - redis_activity
    networks:
      - main
    ports:
      - 8000:8000
  redis_activity:
    image: redis
    command: redis-server --requirepass ${REDIS_ACTIVITY_PASSWORD} --appendonly yes --port ${REDIS_ACTIVITY_PORT}
    volumes:
      - ./redis.conf:/etc/redis/redis.conf
      - redis_activity_data:/data
    env_file: .env
    networks:
      - main
    restart: on-failure
  redis_broker:
    image: redis
    command: redis-server --requirepass ${REDIS_BROKER_PASSWORD} --appendonly yes --port ${REDIS_BROKER_PORT}
    volumes:
      - ./redis.conf:/etc/redis/redis.conf
      - redis_broker_data:/data
    env_file: .env
    ports:
      - 6380:6379
    networks:
      - main
    restart: on-failure
  celery_worker:
    env_file: .env
    build: .
    networks:
      - main
    command: celery -A celerywyrm worker -l info
    volumes:
      - .:/app
      - static_volume:/app/static
      - media_volume:/app/images
    depends_on:
      - db
      - redis_broker
    restart: on-failure
  flower:
    build: .
    command: flower -A celerywyrm
    env_file: .env
    volumes:
      - .:/app
    networks:
      - main
    depends_on:
      - db
      - redis_broker
    restart: on-failure
    ports:
      - 8888:8888
volumes:
  pgdata:
  backups:
  static_volume:
  media_volume:
  redis_broker_data:
  redis_activity_data:
networks:
  main:

以及nginx的reverse proxy:

server {
    server_name 域名;

    listen [::]:80;
    listen 80;
    add_header Strict-Transport-Security "max-age=31536000;includeSubDomains" always;
    rewrite ^ https://$server_name$request_uri;
    location / { return 301 https://$host$request_uri; }
}

# SSL code
ssl_certificate /etc/letsencrypt/live/域名/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/域名/privkey.pem;

server {
    listen [::]:443 ssl http2;
    listen 443 ssl http2;

    server_name 域名;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
    location / {
        proxy_pass http://localhost:8000;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
    }

    location /images/ {
        proxy_pass http://localhost:8001;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
    }

    location /static/ {
        proxy_pass http://localhost:8001;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
    }
}

S3 设置

# S3 configuration                                                                                                      USE_S3=true                                                                                                             AWS_ACCESS_KEY_ID=你的aws的ID
AWS_SECRET_ACCESS_KEY=你的aws的id的密码                                                                                                                                                                                                                                                                               AWS_STORAGE_BUCKET_NAME="桶名字"
AWS_S3_CUSTOM_DOMAIN="桶名字.桶地区.桶服务商.com"       # "example-bucket-name.s3.fr-par.scw.cloud"         

AWS_S3_REGION_NAME="地区"           # "fr-par"                                                                       AWS_S3_ENDPOINT_URL="https://s3.fr-par.scw.cloud"  

(S3部分指路万能的皮皮站长教程

升级:

git pull

docker-compose build

docker-compose exec web python manage.py migrate

docker-compose exec web python manage.py collectstatic --no-input

docker-compose up -d

docker system prune -a

安装之前你需要: 1. 购买域名 2. 配置好DNS服务器 3. 购买VPS服务 4. 设置好VPS服务器的安全配置 5. 安装docker和docker-compose (指路皮皮站长)

sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
  1. 如果你的vps上已经有毛象了的话,建议用sudo useradd -r -m -d /home/bookwyrm -U -G docker bookwyrm 给Bookwyrm的服务创建一个专门的系统用户。

o3o站皮皮站长的毛象搭建教程里面有详细解释。

该教程假设你使用的系统是ubuntu 20.04。

在崭新的vps服务器上安装bookwyrm

ssh至你的vps服务器

cd /home/
mkdir bookwyrm && cd bookwyrm
git clone https://github.com/bookwyrm-social/bookwyrm.git
git checkout production
cp .env.prod.example .env

用nano 或者 vi 编辑.env文件。(nano .env 或者 vi .env)。

.env设置如下:

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY="你的密码"

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG=false
USE_HTTPS=true

DOMAIN=你的域名
EMAIL=你的站长邮箱

# Used for deciding which editions to prefer
DEFAULT_LANGUAGE="English"

## Leave unset to allow all hosts
# ALLOWED_HOSTS="localhost,127.0.0.1,[::1]"

MEDIA_ROOT=images/

PGPORT=5432
POSTGRES_PASSWORD=你的数据库密码
POSTGRES_USER=fedireads
POSTGRES_DB=fedireads
POSTGRES_HOST=db

# Redis activity stream manager
MAX_STREAM_LENGTH=200
REDIS_ACTIVITY_HOST=redis_activity
REDIS_ACTIVITY_PORT=6379
REDIS_ACTIVITY_PASSWORD=你的redis密码

# Redis as celery broker
REDIS_BROKER_PORT=6379
REDIS_BROKER_PASSWORD=你的redis密码

FLOWER_PORT=8888
FLOWER_USER=你的flower用户名
FLOWER_PASSWORD=你的flower密码

EMAIL_HOST=smtp.mailgun.org
EMAIL_PORT=587
EMAIL_HOST_USER=你的bookwyrm服务的邮箱地址
EMAIL_HOST_PASSWORD=你的服务邮箱密码
EMAIL_USE_TLS=true
EMAIL_USE_SSL=false

# Thumbnails Generation
ENABLE_THUMBNAIL_GENERATION=false

# S3 configuration
USE_S3=false
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

# Commented are example values if you use a non-AWS, S3-compatible service
# AWS S3 should work with only AWS_STORAGE_BUCKET_NAME and AWS_S3_REGION_NAME
# non-AWS S3-compatible services will need AWS_STORAGE_BUCKET_NAME,
# along with both AWS_S3_CUSTOM_DOMAIN and AWS_S3_ENDPOINT_URL

# AWS_STORAGE_BUCKET_NAME=        # "example-bucket-name"
# AWS_S3_CUSTOM_DOMAIN=None       # "example-bucket-name.s3.fr-par.scw.cloud"
# AWS_S3_REGION_NAME=None         # "fr-par"
# AWS_S3_ENDPOINT_URL=None        # "https://s3.fr-par.scw.cloud"


# Preview image generation can be computing and storage intensive
# ENABLE_PREVIEW_IMAGES=True

# Specify RGB tuple or RGB hex strings,
# or use_dominant_color_light / use_dominant_color_dark
PREVIEW_BG_COLOR=use_dominant_color_light
# Change to #FFF if you use use_dominant_color_dark
PREVIEW_TEXT_COLOR=#363636
PREVIEW_IMG_WIDTH=1200
PREVIEW_IMG_HEIGHT=630
PREVIEW_DEFAULT_COVER_COLOR=#002549

Nginx配置

还没写完,咕咕咕咕

前情提要:不正之风被恶意注册了700多个博客,时间线充满了机器生成的垃圾英文内容。

网上找教程说是直接删掉mysql的相关内容就好。然而翻开以前的sql笔记,呵,我不认识它,它也不认识我,随即拜托朋友帮忙修好了不正之风。

修复前请自己备份writefreely的database。

以下是修复过程:

sudo mysql

use writefreely

show tables;

select * from users where users.created >= '2021-07-26 00:00:00';

注:”select * from users where users.created >= '2021-07-26 00:00:00';” 这里的时间换成你自己的被攻击的时间。这条命令过后会显示所有在这时间之后才注册的用户,即恶意注册用户。后面的命令同上,时间换成你自己的被攻击的时间。

select * from posts inner join users on posts.owner_id = users.id where users.created >= '2021-07-26 00:00:00'; 

Tables such as 'collectionkeys', 'collections' 逻辑类似,不累述。

删光之后你的writefreely实例就恢复了正常!完结撒花★,°:.☆( ̄▽ ̄)/$:.°★

另:

writefreely有一个叫‘delete-user’ 的功能。不太喜欢直接在database删条目的可以利用这个功能,不过我不确定它是否是只删除用户,文章变孤儿,还是连文章带用户一起删。

https://github.com/writefreely/writefreely/blob/de601e16ac301f2a77a961ce56a68274493ad83e/cmd/writefreely/main.go

1. 万剑帅哥蓝颜命薄

我叫白月光,是个靠与人交合提升修为的合欢宗妖女。

在与本教的低修为歪瓜裂枣们来往了几个回合后,他们将我引荐给了一位叫荀维的万剑山帅哥。

这个帅哥修为也不咋高,但是人长得帅啊!于是我就高高兴兴和人刷好感。

我们一起养育灵兽,花前月下,赏诗饮酒。十年后,他无法压抑自己的感情,向我吐露了爱意,贡献了自己的元阳。

我整个人也被他迷得不要不要的,虽然爱找我探讨剑法然后鄙视我,大早上的把我叫起来练剑,但是无妨,这就是钢铁直男的爱啊!

可惜好景不长,他于修炼一道上实在是没什么天赋,在我为他庆祝生日后不久,他就寿元已尽,陷入了沉睡。

因为徒弟的陨落,荀维的师傅戈季辅心境动摇,突破境界变得更为困难了。我看着怮哭的师傅和他的元阳,心里开始暗暗盘算怎么样子把他搞到手。


2. 回归本心浪荡修炼

荀维的去世就像当头棒喝,一把将沉迷于谈恋爱的我拉出了粉红色的泡泡

from: https://thenewboston.com/tutorials/All/10bec649-967d-4b0d-bc0d-e3c9eacda40c

'==' vs '==='
console.log(19 == '19') //true
console.log(19 === '19') //false
javascript pointer shit
var Bucky = {
       favFood: "bacon",
       favMovie: "Chappie"
};

var Person = Bucky;
Person.favFood = "salad";
console.log(Bucky.favFood); //the print result would be "salad"
nodejs “this”
var Bucky = {
       printFirstName: function() {
            console.log("My Name is Bucky");
            console.log(this === Bucky);
       }
};
Bucky.printFirstName(); //prints "True"

//The default calling context is global
function doSomethingWorthless(){
      console.log("\nI am a worthless piece of shit");
      console.log(this === global);
}
doSomethingWorthless(); //prints "I am ... shit" and "true"
nodejs Prototyping
function User(){
     this.name = "";
     this.life = 100;
     this.giveLife = function giveLife(targetPlayer) {
          targetPlayer.life +=1;
          console.log(this.name + "give 1 life to " + targetPlayer.name);
     }
}

var Bucky = new User();
var Wendy = new User();
Bucky.name = "Bucky";
Wendy.name = "Wendy";

Bucky.giveLife(Wendy); //now Wendy 101, Bucky 100 lives.

//you can add functions to all objects
User.prototype.uppercut = function uppercut (targetPlayer){
     targetPlayer.life -=3;
};

Wendy.uppercut(Bucky); //now Wendy 101, Bucky 97

//You can add properties to all objects
User.prototype.magic = 60;//now both Wendy and Bucky have 60 magics.
Nodejs Modules
//filename: movie.js
module.exports ={
     printAvatar: function(){
          console.log("Avatar");
     },
     printChappie: function(){
          console.log("Chappie");
     },
     favMovie: "The Matrix"
};

... is the same thing as

//filename: movie.js
//module.exports = {};

function printAvatar(){
     console.log("Avatar");
}

function printChappie(){
     console.log("Chappie");
}

var favMovie = "The Matrix";

module.exports.PrintAvatar = printAvatar;
module.exports.printChappie = printChappie;
module.exports.favMovie = favMovie;

in the importing javascript file, you type:

var movies = require('./movies');
movies.printAvatar();
movies.printChappie();
Object Factory
//movies.js
module.exports = function () {
     return{
          favMovie: ""
     }
};

in emily.js:

var movies = require('./movies');

var emilysMovies = movies();
emilysMovies.favMovie = "The Notebook";
console.log("blablabla" + emilysMovies.favMovie);

in bucky.js

var movies = require('./movies');

var buckysMovies = movies();
console.log("blablabla" + buckysMovies.favMovie);

in app.js

require('./emily');
require('./bucky');

The terminal will print:

blablabla The Notebook
blablabla
Creating a Basic Server
var http = require('http');

function onRequest(request, response){
     console.log("A user made a request" + request.url);
     response.writeHead(200, {"Contect-Type": "text/plain"}; //string basically
     response.write("Here is some data");
     response.end();
}

http.createServer(onRequest).listen(8888);
console.log("Server is now running...");
Connect
var connect = require('connect');
var http = require('http');

var app = connect();

function doFirst(request, response, next){
     console.log("Bacon");
     next();
}

function doSecond(request, response, next){
     console.log("Tuna");
     next();
}

app.use(doFirst);
app.use(doSecond);

http.createServer(app).listen(8888);
console.log("Server is running.");

Optional paging:

var connect = require('connect');
var http = require('http');

var app = connect();

function profile(request, response){
     console.log('User requested profile');
}

function forum(request, response){
     console.log('User requested forum');
}

app.use('/profile', profile);
app.use('/forum', forum);

http.createServer(app).listen(8888);
console.log("Server is running.");

#裁缝合集Couture

Darts

Darts are most often used to shape the back of the skirt. A fitted, darted front shows every bump and curve of the body. If you don’t have a flat tummy, front darts may not be flattering and can be eliminated with a stitching technique called staystitch plus.

When making darts, careful marking and stitching go hand in hand. Position pins all along the stitching line, with one horizontal pin marking the tip of the dart. Make sure that pins are in straight lines along both legs of the dart.

Stitch from the wide end of the dart, backstitching as you begin in order to secure the stitches (1). Remove the pins as you come to them.

When you're ½ in. from the tip of the dart, change to a short stitch length (1.5mm) and stitch the last few stitches along the edge of the fabric. Shorter stitches increase stitching accuracy and make tying knots or backstitching unnecessary. Stitch evenly off the edge to prevent a bubble from forming at the tip of the dart (2).

Sew a smooth and true dart every time by mentally drawing a line from the first stitches to the tip, pointing the machine in that direction. This visualization is helpful even if you’ve marked the stitching line with chalk.

Press the dart on a ham. A perfectly pressed dart is nearly invisible on the right side of the fabric.

#建站合集SysAdmin

I tried to set up a sort of soundcloud service today, built using Ruby on Rails for backend with PostgreSQL for the database and ReactJS for the front end.

While I was connected to the vps, “rails server”-ed the server, I had to left my desk for a few minutes, and by the time I was back, the ssh connection was already “reset by peer”.

Then when I was back connected again and tried to relauch the rails server, it gave a warning of “Server is already running in Rails”.

Here is the solution that worked for me:

The following is a copy of the content linked above..

Root Cause:

Because PID is locked in a file and web server thinks that if that file exists then it means it is already running. Normally when a web server is closed that file is deleted, but in some cases, proper deletion doesn't happen so you have to remove the file manually New Solutions

when you run rails server:

  • Booting WEBrick

  • Rails 4.0.4 application starting in development on http://localhost:8080

  • Run rails server -h for more startup options

  • Ctrl-C to shutdown server

A server is already running. Check

/your_project_path/tmp/pids/server.pid.

Exiting

So place your path shown here...

/your_project_path/tmp/pids/server.pid

...and remove this server.pid file:

rm /your_project_path/tmp/pids/server.pid

OR Incase you're server was detached then follow below guidelines:

If you detached you rails server by using command “rails -d” then remove rails detached server by using command

ps -aef | grep rails

OR by this command

sudo lsof -wni tcp:8080

then

kill -9 pID

OR use this command

To find and kill process by port name on which that program is running. For 8080 replace port on which your program is running.

sudo kill -9 $(lsof -i :8080 -t)

#裁缝合集Couture

Hong Kong seam finish
A Hong Kong seam finish, made with China silk, rayon, or silk bias strips, is a flat and elegant binding for hems and waistbands.

Stitching seams is one of the basic components of sewing.

With a little practice, you'll be able to sew perfect straight or curved seams and a variety of professional finishes.

Before you begin sewing, always test for the best stitch length, needle size, and type of thread for your fabric. Test the stitch length for appearance and strength as well as for ease in ripping. A too-long stitch length uses less thread, but creates a puckered seam.

Keep a supply of different needles on hand and use only the best quality—this is not a place to skimp. Change the needle before you begin each new garment and any time the needle hits a pin (listen for the sound of a blunt or bent needle piercing the cloth).

If you notice skipped stitches, or if the thread keeps breaking or fraying, try a different-size needle.

If that doesn’t help, try another brand of needle.

Sewing Perfect Seams

For smooth seams, always cut, stitch, and press seams in the same direction. For skirts, this usually means working along the length of the garment, from hem to waistline.

To sew long side seams, place pins vertically on the stitching line, positioned so that you can pull them out as you sew. This saves time and—because you're not sewing over pins—it also saves wear and tear on the machine.

Pin the top and bottom of the seam first. Next match the notches, then match or ease the fabric in between. A fabric with “tooth” grabs or sticks to itself and thus requires fewer pins than a slippery fabric that moves and slides. You may need to hand-baste some hard-to-handle fabrics, such as velvet, before stitching.

Most seams are sewn with right sides together, using a 5/8-in. seam allowance. Some machines have this 5/8-in. width marked on the throat plate. A magnetic seam guide, which acts as a “fence” along which you can guide the fabric, is also a very helpful tool.

Always press a seam after stitching and before crossing it with another seam or detail.

Remember, stitching and pressing go hand in hand.

Ripping out Seams

Ripping out Seams
Break stitches along one side of the seam with the narrow point of the seam ripper.

Ripping out seams is an essential part of sewing. Use the narrow point of the seam ripper to break a few stitches on one side of the seam. This frees the thread on the other side so that it can be pulled. Working from one end of the seam to the other, rip just a few stitches, grasp the thread with your fingers, and give it a good pull, disposing of the loose threads as you go.

Another way to rip stitches is to use the point of the ripper to break threads on one side of the fabric every 1 in. to 1 in. along the seam and then pull the long freed-up thread on the other side. (The disadvantage is that on the first side you're left with broken threads all along the seam that need to be removed.)

Never work the curved portion of the seam ripper between the two layers of the seam unless the fabric is heavy and very firmly woven.

Otherwise, you’re liable to rip the fabric as well as the threads.

Finishes for Side Seams

Aim for simple, light, unobtrusive seam finishes. Test fabric scraps to see which seam finish is most compatible with your fabric. The seam finish should keep the seam edges from fraying and shouldn't show from the right side. If your fabric doesn’t ravel, the best seam finish is none at all.

Pinked Seams

Pinked Seams
One easy way to finish a seam is with pinking shears. Pink the edges, trimming a small slice of fabric away from the seam allowance.

Trimming with pinking shears is a classic, honest way to finish a seam (see photo). The ultimate in simplicity, it adds no bulk and won't show from the right side. After you sew the seam, trim away the smallest amount of fabric possible.

Test the pinking shears on fabric scraps first. On some fabrics, you can trim both layers of the seam allowance at one time. With other fabrics, to get a clean edge, you must open the seam allowance and trim single layers. Test both methods and compare the results.

Some pinking shears have a notched tip that will cut all the way to the end of the cut. Other brands work best if you don’t fully open the shears and if you don’t cut all the way to the points. Test to see how deep a cut you need to make to work smoothly.

There’s also a rotary cutter with a wavy blade that works well as a pinking tool.

A pinked-and-stitched edge is especially flat and ravel-resistant: Sew a line of stitching ¼ in. from the edge before the seam is sewn.

Pink the edges after seaming, without cutting the line of stitching.

Seams For Bias-Cut Skirts

Cut, making 11-in. seams to allow the fabric to relax. Mark the seamline with basting. Press the pieces. Pin along the marked seamline and try on the garment. Adjust where necessary. You may need to make smaller seam allowances to compensate for the pieces’ having stretched slightly in length and contracted in width. Sew with a slightly shorter stitch length than usual, stretching the fabric as you sew. Because bias does not ravel, you won't need to finish the seams.

Zigzag Seams

Zigzag edges are quick and simple finishes. Both are made after the seam is sewn and pressed.

Both finishes have two disadvantages, however. First, the extra stitching and thread can add bulk to thin fabrics, which will keep them from lying flat. Second, these finishes, which aren’t found in ready-to-wear, shout “homemade.” I generally don’t use them, but you might want to experiment with them yourself.

For a zigzag finish, use a stitch of medium width and length. Stitch near the edge, but not along it, and trim close to the stitching. If your machine has this option, try a machine-overcast stitch. Stitch close to the edge so the points of the stitches fall almost at the edge of the fabric.

Serged Seams

Serged Seams
A serger cuts and overcasts the edges of the seam allowance in one quick and easy operation.

The serger, or overlock machine, has transformed home sewing.

Although it doesn’t replace a conventional machine, a serger is very useful for quickly cutting and finishing seam edges in one fast and easy operation (above right).

Fuse interfacings to pockets and zipper areas before serging. If your fabric frays easily, serge all around the skirt, but on more stable fabrics, serge only the seams that will be pressed open. Serge the hem after you mark the length and trim to desired width.

When using a serger, it’s not necessary to cut wider seams than you normally would. The cutting edge of the serger trims just the ravelly edges before overcasting.

Use fine, soft thread, machine-embroidery thread, or texturized nylon to minimize the amount of thread impression “striking through” on the right side of the fabric. A 3-thread edge, using long staple polyester or coned “serger” thread, is the most versatile of the serged finishes. Or, if your machine has a 2-thread finish, try that for a flatter edge.

Serge a wide edge on fabrics that are heavy or bulky, and a narrow edge on flat fabrics that are lightweight to midweight.


Finishes for Hems and Waistband Seams

For a flat and professional-looking finish, you can bind hems and waistband seams with a Hong Kong finish or with a rayon seam binding.

Hong Kong Finish The Hong Kong finish is a simple and elegant touch for medium to heavy fabrics. This flat, narrow binding makes a fine finish for hems or an inside waistband seam ona skirt (see photo on p. 52), but it’s too bulky for most side seams.

A Hong Kong finish has two lines of stitching and adds three layers of fabric to the edge. The seam edge is bound in bias strips of a lightweight fabric, such as China silk, rayon lining, silk, or polyester crepe de chine.

For the binding, cut ¼-in. wide bias strips, piecing the lengths as necessary. Press the bias strips to remove excess stretchability and to prevent them from rippling.

Before you stitch the waistband to the skirt, sew the binding to the seam edge, with right sides together, /s in. from the edges. (Bind the hem in the same way after marking and trimming it.)

Trim the seam edge to an even 1/8 in. using sharp long-blade shears, or a rotary cutter (1).

Wrap the binding around the seam edge and press. On the right side of the fabric, stitch in the “ditch” of the seam of the waistband and the binding—that is, where the two fabrics are sewn together (2). For accuracy, use an edgestitching foot with the needle in the center position.

On the wrong side of the fabric, trim the excess binding 1/8 in. from the stitching line (3). Bias doesn’t fray, so the binding won't ravel.

Rayon Seam Binding A flat woven-tape seam binding creates a dressmaker’s touch for bulky and flat fabrics that ravel. Use rayon rather than polyester—it’s softer, flatter, and more fluid. With just a bit of practice, you'll find this technique fast and simple.

Rayon seam binding adds less bulk than the Hong Kong finish. It has only one line of stitching and adds only two layers of fabric to the edge. This seam binding can also be used to finish the inside waistband edge and the hem edge.

Press the binding in half lengthwise, making one half slightly wider than the other. Hold the end in place with a straight pin as you work.

Position the narrow half of the binding on top of the right side of the fabric and stitch along this half (4). This way, you'll be sure that your stitches will catch the wider half of the binding on the other side of the fabric.

As you stitch along the edge of the binding, pull it slightly toward the fabric with your finger so that it wraps around and encases the raw edge. Press to eliminate puckers.

trim the binding to an even 1/8 in.
1. To apply Hong Kong finish, trim the binding to an even 1/8 in. with shears or a rotary cutter.

Wrap the binding around the edges, press and stitch in the ditch of the seam on the right side of the fabric.
2. Wrap the binding around the edges, press and stitch in the ditch of the seam on the right side of the fabric.

Trim excess binding
3. Trim excess binding on the wrong side of the fabric. Here, an appliqué scissors is used to get as close as possible to the seam.

rayon seam binding
4. To apply rayon seam binding, stitch the press binding with the narrower half on top of the right side of the fabric.