# change mirror to ubuntu.osuosl.org first
sudo apt-get update
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
import sublime, sublime_plugin | |
import os, string, re | |
class DetectFileTypeCommand(sublime_plugin.EventListener): | |
""" Attempts to choose the correct syntax when more than one could apply. """ | |
def __init__(self): | |
super(DetectFileTypeCommand, self).__init__() | |
self.path = None |
upstream myapp { | |
server unix:///myapp/tmp/puma.sock; | |
} | |
server { | |
listen 80; | |
server_name myapp.com; | |
# ~2 seconds is often enough for most folks to parse HTML/CSS and | |
# retrieve needed images/icons/frames, connections are cheap in |
# config/application.rb | |
# append to bottom | |
require 'i18n_time_zone' |
//shake animation: http://stackoverflow.com/questions/27987048/shake-animation-for-uitextfield-uiview-in-swift | |
public extension UIView { | |
func shake(count : Float? = nil,for duration : TimeInterval? = nil,withTanslation translation : Float? = nil) { | |
let animation : CABasicAnimation = CABasicAnimation(keyPath: "transform.translation.x") | |
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) | |
animation.repeatCount = count ?? 2 | |
animation.duration = (duration ?? 0.5)/TimeInterval(animation.repeatCount) | |
animation.autoreverses = true |
Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.
csrutil enable --without debug
command in recovery mode).