system.cpu.idle: % Idle CPUsystem.cpu.system: % System CPUsystem.cpu.user: % User CPU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Look at 2nd line, if it starts with LP then it's LG, LSN means it's Samsung | |
| ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn summer | |
| [nums] | |
| (if (= (count nums) 1) | |
| (peek nums) | |
| (+ (summer (pop nums)) (peek nums)) | |
| ) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.ActivityManager; | |
| import android.content.Context; | |
| import android.content.pm.ConfigurationInfo; | |
| public class OpenGLVersionChecker { | |
| final Context context; | |
| final ConfigurationInfo configurationInfo; | |
| public OpenGLVersionChecker(Context context) { | |
| this.context = context; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static android.opengl.GLES20.GL_COMPILE_STATUS; | |
| import static android.opengl.GLES20.GL_FRAGMENT_SHADER; | |
| import static android.opengl.GLES20.GL_LINK_STATUS; | |
| import static android.opengl.GLES20.GL_VALIDATE_STATUS; | |
| import static android.opengl.GLES20.GL_VERTEX_SHADER; | |
| import static android.opengl.GLES20.glAttachShader; | |
| import static android.opengl.GLES20.glCompileShader; | |
| import static android.opengl.GLES20.glCreateProgram; | |
| import static android.opengl.GLES20.glCreateShader; | |
| import static android.opengl.GLES20.glDeleteProgram; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /-+\~_. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- filter by table name | |
| select indexrelname, idx_scan, idx_tup_read, idx_tup_fetch from pg_stat_user_indexes where relname = '<TABLE NAME>'; | |
| -- filter by index name | |
| select idx_scan, idx_tup_read, idx_tup_fetch from pg_stat_user_indexes where indexrelname = '<IDX NAME>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # pdiff: colorized diffs for linux p4 workspaces | |
| # usage: pdiff <CL#> | |
| p4 opened -c $1 | sed -e 's/#.*//' | p4 -x - diff -du | colordiff |
Due to the incessant swarm of complete and utter nonsense that has been forcing its way into Firefox over time, I've decided to start collecting my personal list of “must-have” about:config tweaks required to turn Firefox into a functional brower.
NOTE: Unfortunately this is somewhat out of date. The comments link to some resources that may be more up-to-date. Patches welcome.
These can be used for nefarious purposes and to bypass access restrictions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Python code compiles to bytecode which can not run concurrently | |
| 2. GIL protects:, reference count updates, mutable types, some internal bookkeeping | |
| 3. Can't use threads | |
| 4. Python instructions are not interruptible |