Skip to content

Instantly share code, notes, and snippets.

View skibitsky's full-sized avatar

Gleb Skibitsky skibitsky

View GitHub Profile
@0xabad1dea
0xabad1dea / copilot-risk-assessment.md
Last active September 11, 2023 10:21
Risk Assessment of GitHub Copilot

Risk Assessment of GitHub Copilot

0xabad1dea, July 2021

this is a rough draft and may be updated with more examples

GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?

Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Localization;
using UnityEngine.ResourceManagement.AsyncOperations;
public class PreloadSelectedTables : MonoBehaviour
{
public List<LocalizedStringTable> tablesToPreload = new List<LocalizedStringTable>();
@karljj1
karljj1 / EditorBootScene.cs
Created February 11, 2021 14:17
Initializes the localization settings before entering into a scene in play mode
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.Localization.Settings;
using UnityEngine.SceneManagement;
[InitializeOnLoad]
public static class EditorBootScene
{
static EditorBootScene()
{
@skibitsky
skibitsky / Billboard.shader
Last active February 19, 2021 08:11
Best billboard shader. Transparency, rotation, scale, optional "render on top".
Shader "Futuclass/Billboard"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
[Enum(Yes, 0, No, 4)] _ZTest("Render on top", Int) = 4
}
SubShader
{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" }
@danielberndt
danielberndt / README.md
Last active October 26, 2022 09:45
Codecks Api Guide

Quick Guide to Tinkering with the Codecks API

Version: Jan 2021

The Codecks API is the source for powering the web app, so expect it to be fairly stable and expansive. We can't yet make any guarantees regarding the stability of all schema definitions and endpoints at this point. So tread with care!

To get started you need to extract your access token. This token will allow anyone who holds it to impersonate you. This also means they have access to all the same Organizations and contents as you do via the web app. So be careful who you share it with. You might want to create an observer user and use their token if this helps your use case (and the observer limitations suit your use case) you might also create a new non-observer user but this will count towards your user quota.

To extract the token, check requests going to the codecks api (https://api.codecks.io). There you'll find a cookie called at containing your token.

@cmod
cmod / hugofastsearch.md
Last active May 1, 2024 05:20 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@M4cs
M4cs / istats.py
Last active March 23, 2024 20:32
Getting iStats Widget
import os
import time
import subprocess
while True:
output = subprocess.check_output(['istats', 'cpu'])
output1 = subprocess.check_output(['istats', 'fan'])
output2 = subprocess.check_output(['istats', 'battery'])
new_output = '\n\n\n' + str(output.decode('utf-8')) + '\n' + str(output1.decode('utf-8')) + '\n' + str(output2.decode('utf-8'))
print(new_output.replace('For more stats run `istats extra` and follow the instructions.', ''))
@benjamineskola
benjamineskola / evening.applescript
Last active November 30, 2022 09:57
Automatically set repeating tasks tagged ‘Evening’ to be done this evening, in Things 3 — updated versions here: https://github.com/benjamineskola/things-scripts/blob/master/evening.applescript
-- run first thing in the morning, e.g., from cron
tell application "Things3"
set theToken to "your-auth-token"
set theTodos to to dos of list "Today"
repeat with aTodo in theTodos
set tagList to tags of aTodo
repeat with aTag in tagList
if (name of aTag as text) is "Evening"
@jamiebrynes7
jamiebrynes7 / ecs-string.cs
Created August 8, 2018 15:11
Strings in an ECS component
// Allocation singleton class
public static class StringProvider
{
private static readonly Dictionary<uint, string> Storage = new Dictionary<uint, string>();
private static uint nextHandle = 0;
public static uint Allocate(string value = default(string))
{
@kaiware007
kaiware007 / billboard.shader
Created January 19, 2018 09:28
Simple Billboard shader for Unity
Shader "Unlit/Billboard"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" }