** 目前仅支持 MacOS ##
打开终端程序, 复制、粘贴、执行以下句子:
curl -s -I https://www.atom.io/api/updates/download --header 'User-Agent: Atom/0.1 CFNetwork/1.5'|grep '^Location:'| sed -e 's+^.*\(https://.*\)$+\1+g'
稍等片刻,会输出类似下面的一行内容:
// For example: | |
// UIColorFromRGBA(0xffee00, 0.5) | |
// UIColorFromRGB(0xffee00) | |
static inline UIColor *UIColorFromRGBA(int rgb, float a) { | |
return [UIColor colorWithRed:((float)((rgb & 0xFF0000) >> 16))/255.0 | |
green:((float)((rgb & 0xFF00) >> 8))/255.0 | |
blue:((float)(rgb & 0xFF))/255.0 alpha:a]; | |
} |
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |
// Inspired by suggestion to use NSScanner: http://stackoverflow.com/questions/1918972/camelcase-to-underscores-and-back-in-objective-c | |
#import "NSString+Inflections.h" | |
@implementation NSString (Inflections) | |
- (NSString *)underscore | |
{ | |
NSScanner *scanner = [NSScanner scannerWithString:self]; | |
scanner.caseSensitive = YES; |
** 目前仅支持 MacOS ##
打开终端程序, 复制、粘贴、执行以下句子:
curl -s -I https://www.atom.io/api/updates/download --header 'User-Agent: Atom/0.1 CFNetwork/1.5'|grep '^Location:'| sed -e 's+^.*\(https://.*\)$+\1+g'
稍等片刻,会输出类似下面的一行内容:
#!/usr/bin/env perl | |
# Copyright (c) 2015 Sergey Lyubka | |
# All rights reserved | |
use Encode; | |
my $dir = "/Users/$ENV{USER}/.Trash"; | |
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; } |
require 'formula' | |
class Unzip < Formula | |
homepage 'http://www.info-zip.org/pub/infozip/UnZip.html' | |
url 'https://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz' | |
version '6.0' | |
sha1 'abf7de8a4018a983590ed6f5cbd990d4740f8a22' | |
keg_only :provided_by_osx |
[General] | |
loglevel = notify | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24,100.64.0.0/10 | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24,100.64.0.0/10 | |
// DNS OVERRIDE, REMOVE # IF YOU NEED | |
dns-server = 119.29.29.29,223.6.6.6,223.5.5.5,114.114.114.114,114.114.115.115 | |
[Rule] |
application loader stuck at the stage of “Authenticating with the iTunes Store”
$ vim /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/java/lib/net.properties
# replace `# https.proxyPort=443` with `https.proxyPort=80`
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.
Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.
#!/bin/bash | |
sudo apt-get install apt-transport-https ca-certificates -y | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo rm -f /etc/apt/sources.list.d/docker.list | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-get purge lxc-docker | |
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual | |
sudo apt-get install docker-engine |