- brew update
- brew doctor
- brew upgrade
- Get rid of RVM totally
- Use rbevn instead
| // get screen size | |
| int screenHeight = getResources().getDisplayMetrics().heightPixels; | |
| int screenWidth = getResources().getDisplayMetrics().widthPixels; |
| String original = "*meta"; | |
| String regex = original.replace("?", ".?").replace("*", ".*?"); | |
| if (file.exists()) { | |
| File[] children = file.listFiles(); | |
| for (File s : children) { | |
| Log.i("FilePath", s.getName()); | |
| if (s.getName().matches(regex)) | |
| Log.i("FilePath", "Match: " + s.getName()); | |
| } |
| var Lawnchair = function (options, callback) { | |
| // ensure Lawnchair was called as a constructor | |
| if (!(this instanceof Lawnchair)) return new Lawnchair(options, callback); | |
| // ... | |
| } |
| <!-- This is the case when you define the style in your style.xml --> | |
| <ProgressBar | |
| android:id="@+id/background_sync_indicator" | |
| style="?android:attr/progressBarStyleHorizontal" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| android:layout_above="@+id/overlay_info_cache" | |
| android:layout_marginBottom="-6dp" | |
| android:indeterminate="true" | |
| android:visibility="gone" /> |
| String fn = "filename_pattern"; | |
| File dir = getFilesDir(); | |
| for (File f : dir.listFiles()) { | |
| if (f.getName().contains(fn)) { | |
| f.delete(); | |
| } | |
| } |
| @Override | |
| public void onDraw(Canvas canvas) { | |
| if (positionSet) { | |
| float x0 = (float) (mCentralPoint.x - check.getWidth() / 2); | |
| float y0 = (float) (mCentralPoint.y - check.getHeight() / 2); | |
| // draw circle | |
| canvas.drawCircle((float) mCentralPoint.x, (float) mCentralPoint.y, (float) size, mPaint); |
| { | |
| "plan": "Enterprise", | |
| "kid": "ddynrnyrf3irxxhkqk39", | |
| "counts": { | |
| "offline": { | |
| "default": 2 | |
| }, | |
| "online": 4 | |
| }, | |
| "appname": "artgeek", |
| #!/usr/bin/env python | |
| class Wine(): | |
| def __init__(self): | |
| self.name = None | |
| self.price = None | |
| self.country = None | |
| self.region = None |
| import datetime | |
| import calendar | |
| future = datetime.datetime.utcnow() + datetime.timedelta(days=14) | |
| ts = calendar.timegm(future.timetuple()) | |
| print ts |