Skip to content

Instantly share code, notes, and snippets.

@pypykim
pypykim / lock.m
Created March 29, 2016 06:59 — forked from typcn/lock.m
Unlock & Lock your mac
extern void SACLockScreenImmediate ( );
SACLockScreenImmediate();
@pypykim
pypykim / configure-winrm.ps1
Created November 23, 2015 12:40 — forked from sneal/configure-winrm.ps1
Configure WinRM for Vagrant
winrm quickconfig -q
winrm quickconfig -transport:http
winrm set winrm/config '@{MaxTimeoutms="7200000"}'
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="0"}'
winrm set winrm/config/winrs '@{MaxProcessesPerShell="0"}'
winrm set winrm/config/winrs '@{MaxShellsPerUser="0"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/client/auth '@{Basic="true"}'
winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port="5985"} '
@pypykim
pypykim / helper.py
Created July 8, 2014 14:43
autolink.content
#!/usr/bin/env python
# coding=utf-8
#
# Copyright 2012 F2E.im
# Do have a faith in what you're doing.
# Make your life a story worth telling.
import json
import re
import string
@pypykim
pypykim / getNetworkInfo.py
Created July 2, 2014 02:09
getNetworkInfo.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os,sys
import socket
def GetInfo(iface):
''' [AdapterName, MacAddr, IPAddr, NetMask, Gateway] '''
NAME_INFO=[];IP_INFO=[];MAC_INFO=[];MSK_INFO=[];GW_INFO=[];IPV6_INFO=[]
dict_ip={};dict_mac={};dict_msk={};dict_gw={}
@pypykim
pypykim / new_host_file
Created June 12, 2014 13:47
google_ip_host
[googlesourceList]
[googleapisList]
123.205.250.80 = googleapisList
121.78.74.99 = googleapisList
123.205.250.166 = googleapisList
103.25.178.19 = googleapisList
[googlevideoList]
118.174.25.7 = googlevideoList
@pypykim
pypykim / google_temp.py
Created June 12, 2014 00:42
temp google
#!/usr/bin/env python
#coding:utf-8
import sys
from GCC import ip_set
usage = '''
get_host.py usage:
-h, --help, print help message
get_host.py [ip_address], for example, get_host.py 192.168.1.1
@pypykim
pypykim / hosts.file
Created June 11, 2014 13:05
hosts.file
#
# link: https://github.com/txthinking/google-hosts
#
# UPDATE: Mon Jun 9 07:21:51 UTC 2014
#
127.0.0.1 localhost
210.61.221.123 0.docs.google.com
210.61.221.123 0.drive.google.com
210.61.221.123 1.docs.google.com
210.61.221.123 1.drive.google.com
@pypykim
pypykim / google_ip_filter.py
Created June 11, 2014 06:44
google_ip_filter.py
#!/usr/bin/env python
#coding:utf-8
import sys
usage = '''
get_host.py usage:
-h, --help, print help message
get_host.py [ip_address], for example, get_host.py 192.168.1.1
'''
@pypykim
pypykim / ftp1.bat
Created June 2, 2014 14:44
ftp1.bat
@echo off
echo PLEASE WAIT...
mkdir d:\test
echo ftpuser> d:\test\temp.ftp
echo 123456>> d:\test\temp.ftp
echo lcd d:\test>> d:\test\temp.ftp
echo get test.zip>> d:\test\temp.ftp
echo bye>> d:\test\temp.ftp
ftp -s:d:\test\temp.ftp 172.31.10.194 > d:\test\output.txt