Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pinfort's full-sized avatar
🏢
Shachiku

pinfort pinfort

🏢
Shachiku
View GitHub Profile
@pinfort
pinfort / createNewMailUser.py
Created September 9, 2017 05:11
メールユーザー追加用スクリプト python2
# -*- coding: utf-8 -*-
import os
import random
username = raw_input("user name? >>")
cmd = "useradd -s /sbin/nologin " + username
os.system(cmd)
length = random.randint(8, 12)
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890%/'
newpass = ""
for i in range(1, length):
@pinfort
pinfort / fileMove.py
Created September 25, 2017 08:37
ファイル移動
# -*- coding: utf-8 -*-
import os
import shutil
import sys
path = '/mnt/hdd1/nas/picture/smartphone/rei/20170909/pictures/Twitter'
files = os.listdir(path)
# ファイル移動
@pinfort
pinfort / tweet.py
Last active November 3, 2017 05:51
import os
import tweepy
class Tweet(object):
"""
use tweepy
"""
def __init__(self):
consumer_key = os.environ.get("TWITTER_CONSUMER_KEY")
consumer_secret = os.environ.get("TWITTER_CONSUMER_SECRET")
@pinfort
pinfort / combnaf.md
Last active June 2, 2018 07:30
がくせいえるてぃーにもっていくもの
  • 新幹線チケット
  • 名刺
  • パソコン
  • スマホ
  • 充電器
  • さいふ
  • モバブ
  • あとなに?
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://どめいん/$1 [R=302,L]
<?php
namespace zonuexe\ZoProxy;
// サブドメインで公開する場合、このパスが一階層変わります。
require_once(dirname(__FILE__).'/../../railsinstaller/php/vendor/autoload.php');
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Psr7;
# -*- coding: utf8 -*-
import os
import time
username = raw_input("input new user name\n>>")
os.system("useradd %s" % unicode(username))
os.system("passwd %s" % unicode(username))
os.system("chmod 701 /home/%s" % unicode(username))
os.system("mkdir /home/%s/.ssh" % unicode(username))
os.system("chmod 700 /home/%s/.ssh" % (unicode(username),))
@pinfort
pinfort / example.json
Created March 27, 2019 03:50
example json file
{ "name":"John", "age":30, "car":null }

mytest

>test > test > test

Keybase proof

I hereby claim:

  • I am pinfort on github.
  • I am pinfort (https://keybase.io/pinfort) on keybase.
  • I have a public key whose fingerprint is 7230 149F 6DC9 FE66 AFF5 1AA8 86F7 0972 CD95 0D8C

To claim this, I am signing this object: