This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
| /////////////////////////////////////////////////////////////////////////////// | |
| // ABOUT: A unity Shader .cginc to draw numbers in the fragment shader | |
| // AUTHOR: Freya Holmér | |
| // LICENSE: Use for whatever, commercial or otherwise! | |
| // Don't hold me liable for issues though | |
| // But pls credit me if it works super well <3 | |
| // LIMITATIONS: There's some precision loss beyond 3 decimal places | |
| // CONTRIBUTORS: yes please! if you know a more precise way to get | |
| // decimal digits then pls lemme know! | |
| // GetDecimalSymbolAt() could use some more love/precision |
| #!/bin/bash | |
| # Icons and names | |
| ICONS=( | |
| "icon_16x16.png:16x16" | |
| "icon_16x16@2x.png:32x32" | |
| "icon_32x32.png:32x32" | |
| "icon_32x32@2x.png:64x64" | |
| "icon_128x128.png:128x128" | |
| "icon_128x128@2x.png:256x256" |
| # Put this function to your .bashrc file. | |
| # Usage: mv oldfilename | |
| # If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
| # Original mv is called when it's called with more than one argument. | |
| # It's useful when you want to change just a few letters in a long name. | |
| # | |
| # Also see: | |
| # - imv from renameutils | |
| # - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
| ############## | |
| # pretty prompt and font colors | |
| ############## | |
| # alter the default colors to make them a bit prettier | |
| echo -en "\e]P0000000" #black | |
| echo -en "\e]P1D75F5F" #darkred | |
| echo -en "\e]P287AF5F" #darkgreen | |
| echo -en "\e]P3D7AF87" #brown | |
| echo -en "\e]P48787AF" #darkblue |
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| Bitmap batmapBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.batman); | |
| RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), batmapBitmap); | |
| // option 1 h/t [Chris Banes](https://chris.banes.me/) | |
| circularBitmapDrawable.setCornerRadius(batmapBitmap.getWidth()); | |
| // option 2 h/t @csorgod in the comments | |
| circularBitmapDrawable.setCircular(true); |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.Paint; | |
| import com.squareup.picasso.Transformation; | |
| public class CircleTransform implements Transformation { | |
| private final int BORDER_COLOR = Color.WHITE; |
| #!/usr/bin/env lua | |
| local http=require("socket.http"); | |
| local request_body = [[login=user&password=123]] | |
| local response_body = {} | |
| local res, code, response_headers = http.request{ | |
| url = "http://httpbin.org/post", | |
| method = "POST", | |
| headers = |