Skip to content

Instantly share code, notes, and snippets.

@cdarken
cdarken / gist:ec27b06d6b7f7d95f8deee7fee7d78cd
Last active June 14, 2019 07:59
Setting clocks and voltages for Polaris cards
#!/bin/bash
FAN_SPEED=30
RESET="n"
[[ "$2" == "print" ]] && PRINT_ONLY="y" || PRINT_ONLY=
if [ "$1" == "XMR1" ]; then
MEM="m 2 2100 850"
GPU_1_G="s 3 1125 825"
GPU_2_G="s 3 1125 812"
@cdarken
cdarken / Sublime Text 3 cheating.md
Created November 30, 2018 11:40 — forked from laptrinhcomvn/Sublime Text 3 cheating.md
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@cdarken
cdarken / Ionic production build
Created December 24, 2014 08:23
Quick solution for ionic build optimized
Step 1: Add some npm packages to your devDependencies section in package.json:
"gulp-usemin": "^0.3.8",
"gulp-util": "^2.2.14",
"run-sequence": "^1.0.2",
"shelljs": "^0.3.0"
Step 2: Import them in gulpfile.js:
var sh = require('shelljs');

This is a simple demo of how to create and use a Response Interceptor in AngularJS. In this case we are using the interceptor to convert the objects created from a JSON data load into typed instances of a custom "class".

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer