Skip to content

Instantly share code, notes, and snippets.

@cemolcay
cemolcay / ArcTextLayer.swift
Created January 22, 2017 22:03
Draws a curved string on a CALayer with angle, radius and text that you give.
import UIKit
// swift port of stackoverflow answer
// http://stackoverflow.com/a/31301238/2048130
extension CGFloat {
/** Degrees to Radian **/
var degrees: CGFloat {
return self * (180.0 / .pi)
}
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active December 10, 2024 06:04
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@SoftwareDevPro
SoftwareDevPro / axios_cheatsheet.md
Created December 27, 2020 06:20
Axios is a promise based HTTP client for the browser and Node

Axios is a promise based HTTP client for the browser and Node. Axios makes it easy to send asynchronous HTTP requests to REST API endpoints and perform CRUD (create,read,update,delete) operations. It can be used in vanilla plain JavaScript or with a library such as Vue or React.

Installing Axios

  • npm: npm install axios
  • pnpm: pnpm install axios
  • bower: bower install axios
@SoftwareDevPro
SoftwareDevPro / php_cheatsheet.md
Created January 20, 2021 18:01
PHP Cheatsheet

PHP Cheatsheet

Including PHP in a file

<?php
    // place PHP code here
?>
@SoftwareDevPro
SoftwareDevPro / javascript_cheatsheet.md
Created January 30, 2021 00:56
Javascript Cheatsheet

Javascript Cheatsheet

Data Types

let age = 28; // Number

let name = "Joe"; // string

let name = { // object
  firstName : "Joe", 
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active December 10, 2024 06:00
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@anujonthemove
anujonthemove / cuda-cudnn-export-paths.txt
Last active December 10, 2024 05:55
Export paths for CUDA and cuDNN.
export CUDA_HOME=/usr/local/cuda
export PATH=/usr/local/cuda/bin:$PATH
export CPATH=/usr/local/cuda/include:$CPATH
export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
@mrpeardotnet
mrpeardotnet / PVE-HP-ssacli-smart-storage-admin.md
Created November 25, 2019 22:10
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@BijanProgrammer
BijanProgrammer / website-deployment.md
Last active December 10, 2024 05:52
How to Deploy a Website?

How to Deploy a Website?

Intro

Prerequisites

  • Web Development
  • Node.js
  • Git & GitHub
  • Terminal