Skip to content

Instantly share code, notes, and snippets.

View wedojava's full-sized avatar
🎯
Focusing

回风 wedojava

🎯
Focusing
View GitHub Profile
@wedojava
wedojava / gist:3b7f06d13d6612a7232e
Last active August 29, 2015 14:17
[转]解决sudo: sorry, you must have a tty to run sudo
在网上了解到可以如下解决:
1. 编辑 /etc/sudoers
1)Defaults requiretty,修改为 #Defaults requiretty,表示不需要控制终端。
2)Defaults requiretty,修改为 Defaults:nobody !requiretty,表示仅 nobody 用户不需要控制终端。
如果修改为 Defaults:%nobody !requiretty,表示仅 nobody 组不需要控制终端。
其实只要注释掉)Defaults requiretty 那个就可以了。表示在执行的时候不打开终端。但是,有的shell必须要有终端才可以执行。这样显然是不行的。后来,又找到一片文章才搞定。下面为抄录的,仅为记录以后使用。
@wedojava
wedojava / gist:6f913c14814a417bb881
Last active August 29, 2015 14:17
vagrant启动报错The following SSH command responded with a non-zero exit status.

###报错信息:

  The following SSH command responded with a non-zero exit status.
  
  Vagrant assumes that this means the command failed!
  
  ARPCHECK=no /sbin/ifup eth1 2> /dev/null
  
  Stdout from the command:
 
@wedojava
wedojava / gist:a0e2cf1cf11bd8269db8
Created March 22, 2015 09:50
OS X Yosemite系统怎么制作u盘安装盘
需要通过系统验证,所以你只有制作启动U盘的方法来升级到 OS X 10.10,同时你需要知道的是,通过这种方法升级到 OS X10.10其硬盘将会格式化,所以请备份你所有的资料。
首先,你需要从 App Store中下载完整的 OS X Yosemite 安装程序,该安装程序下载完后会存放在应用程序(/Applications)文件夹中。请注意,此时一定不要直接启动该程序安装 OS X Yosemite,因为一旦安装完后该安装程序会被删除。至少,你应该先做完独立安装介质之后再启动该程序安装。
准备独立安装盘介质:你需要一个容量至少大于 8GB 的移动存储设备,比如 U 盘、移动硬盘或 SD 卡,将其插入 Mac,并启动磁盘工具对该介质执行”抹掉”操作,抹掉前请备份好该介质中的重要数据。盘符名请命名为”Untitled” 格式[Mac OS Extended (Journaled)]/[Mac OS 扩展(日志式)]。
通过”终端”命令制作安装盘:打开 "终端", 在命令行中执行下面的命令,当提示输入密码时请输入你的 OS X 管理员登陆密码。
中文版与英文版的区别主要在于你下载的安装程序 ( Install OS X Yosemite )是英文版 ,(安装 OS X Yosemite)是中文版。
@wedojava
wedojava / gist:50d991c0721ed4eeafdd
Created March 25, 2015 05:08
Fix “Class ‘Form’ or ‘HTML’ not found” in Laravel 5
If you’re upgrading from Laravel 4 to Laravel 5, you’re most likely going to come across one of these two errors:
Class ‘Form’ not found
or
Class ‘Html’ not found
This is a really simple fix. Open up your composer.json file and require:
“illuminate/html”: “~5.0″
Then open up config/app.php and add the Html service provider to the providers array:
@wedojava
wedojava / gist:41296a19a759a57c3d6d
Created March 25, 2015 09:59
用laravel5做下拉列表,列表内容从数据库读取
放个例子:
视图:{!!Form::select('difficulty', $difficulties)!!}
控制器:
public function edit($id)
{
return view('admin.questions.edit')
->withQuestion(Question::find($id))
->withDifficulties(Difficulty::lists('name', 'id'));
}
@wedojava
wedojava / Material-Theme-BHL.sublime-theme
Last active December 22, 2015 06:06
MySublimeText3-Settings
[
/* @ EMPTY WINDOW
* Style for empty (no tabs) window
* 安装完 Material Theme 后,此文件放到 Packages/Material Theme/ 目录下面即可
* 主要修改了原有的背景颜色来搭配 Facebook (SL).tmTheme
========================================================================= */
{
"class": "sheet_container_control",
{
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Material Theme",
"terminal.integrated.fontFamily": "Fira Code",
"editor.fontFamily": "'Fira Code', 'Fira Mono', Consolas, 'Courier New', monospace",
"editor.lineNumbers": "off",
"editor.lineHeight": 20,
"editor.fontSize": 13,
"editor.fontLigatures": true,
"terminal.integrated.fontWeightBold": "bold"
@wedojava
wedojava / init.md
Last active February 10, 2020 06:33
windows init setting

GPEdit

gpedit.msc

Scoop

Install Scoop

set-executionpolicy remotesigned -scope currentuser
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
@wedojava
wedojava / sublimeConfig
Created February 19, 2020 18:50
sublimeConfig[mac]
{
"always_show_minimap_viewport": false,
"bold_folder_labels": false,
"color_scheme": "Packages/User/SublimeLinter/Facebook (SL).tmTheme",
"enable_tab_scrolling": false,
"font_face": "Fira Code",
"font_options":
[
"gray_antialias"
],
@wedojava
wedojava / Mintty.md
Last active November 17, 2021 14:52 — forked from mohnish/Mintty.md
Mintty Themes for Windows