Discover gists
This file contains 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
# here i am using terminal-notifier | |
# https://github.com/julienXX/terminal-notifier | |
# you can use your own solution | |
# main setting stored in variable | |
# local execution_treshold=30 | |
# if your process executed more than 30 seconds | |
# you will get notified | |
This file contains 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
var canvas = document.getElementById('myCanvas'); | |
var ctx = canvas.getContext('2d'); | |
// Define images with their respective properties | |
var images = [ | |
{ | |
image: new Image(), | |
src: 'image1.png', | |
x: 100, | |
y: 100, |
This file contains 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
var canvas = document.getElementById('myCanvas'); | |
var ctx = canvas.getContext('2d'); | |
// Define images with their respective properties | |
var images = { | |
image1: { | |
image: new Image(), | |
src: 'image1.png', | |
x: 100, | |
y: 100, |
This file contains 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
var canvas = document.getElementById('myCanvas'); | |
var ctx = canvas.getContext('2d'); | |
// Define images with their respective properties | |
var images = { | |
'image1.png': { | |
image: new Image(), | |
x: 100, | |
y: 100, | |
width: 50, |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<CDataFileMgr__ContentsOfDataFileXml> | |
<disabledFiles /> | |
<includedXmlFiles itemType="CDataFileMgr__DataFileArray" /> | |
<includedDataFiles /> | |
<dataFiles itemType="CDataFileMgr__DataFile"> | |
<Item> | |
<filename>platform:/data/cdimages/scaleform_platform_pc.rpf</filename> | |
<fileType>RPF_FILE</fileType> | |
</Item> |
This file contains 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
using UnityEngine; | |
using TMPro; | |
using Sirenix.OdinInspector; | |
/// <summary> | |
/// An extension of TextMeshPro that causes the text to be displayed in a | |
/// circular arc. | |
/// | |
/// Adapted from https://github.com/TonyViT/CurvedTextMeshPro and improved. | |
/// TonyViT's version has some unnecessary properties and doesn't use the |
This file contains 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 | |
# | |
# Install Python 2.6 from Source | |
# | |
# Author : Scott Barr | |
# Date : 21 Jan 2010 | |
# | |
PYTHON_VERSION=2.6.4 |
This file contains 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
SUFFIXES = {1: 'st', 2: 'nd', 3: 'rd'} | |
def get_ordinal(i): | |
# Adapted from https://codereview.stackexchange.com/questions/41298/producing-ordinal-numbers | |
if 10 <= i % 100 <= 20: | |
return 'th' | |
else: | |
return SUFFIXES.get(i % 10, 'th') |
This file contains 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
// Get the canvas element from the HTML document | |
var canvas = document.getElementById('myCanvas'); | |
// Get the 2D rendering context of the canvas, which allows us to draw on it | |
var ctx = canvas.getContext('2d'); | |
// Define images with their respective properties | |
// This is an object where we store information about our images | |
var images = { | |
// Key: 'image1.png', Value: Object containing properties of the first image |
This file contains 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 | |
echo "127.0.0.1 localhost" | sudo tee --append /etc/hosts | |
echo "127.0.0.1" `ec2metadata --local-hostname` | sudo tee --append /etc/hosts | |
## Remove --append to overwrite the file |
NewerOlder