Skip to content

Instantly share code, notes, and snippets.

View CoolONEOfficial's full-sized avatar
💭
The programmer creates a new one, the coder follows the instructions

Nikolai Trukhin CoolONEOfficial

💭
The programmer creates a new one, the coder follows the instructions
View GitHub Profile
@KyLeggiero
KyLeggiero / LICENSE.txt
Last active April 14, 2022 19:49
Make UIColor Codable
BLUE HUSKY LICENSE 0 - PUBLIC DOMAIN - OPUS 7
0: LAYMAN'S TERMS
This section is meant to explain the purpose of this License in Layman's
terms, and should thusly never be seen as legally binding. This disclaimer does
not apply to further sections of this License.
1. This is no one's product and is in the public domain
2. You're not responsible for any bad things that might happen because someone
used this product
@zzpmaster
zzpmaster / formatBytes.dart
Last active February 8, 2024 18:51
convert bytes to kb mb in dart
static String formatBytes(int bytes, int decimals) {
if (bytes <= 0) return "0 B";
const suffixes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
var i = (log(bytes) / log(1024)).floor();
return ((bytes / pow(1024, i)).toStringAsFixed(decimals)) +
' ' +
suffixes[i];
}
@daliborgogic
daliborgogic / default.vue
Last active October 16, 2020 17:59
Vantablack? Nuxt.js simple theme switch
<script>
export default {
computed: {
theme () {
const [color, backgroundColor] = this.$store.state.theme
return {
'--color': color,
'--background-color': backgroundColor
}
}
@cohenadair
cohenadair / firebase-sandbox.md
Last active September 26, 2023 05:39
Setting up development and production Firebase environments for iOS

Firebase Environments

Last updated: October 21st, 2019.

At the time of writing this gist (January 4th, 2017), I was unable to find true sandboxing to separate development and production environments for a Firebase project. The closest we can get is to create two separate Firebase projects -- one for development and one for production.

Pros

  • Complete separation and isolation of all Firebase features.
  • Freedom to experiment without risking the corruption of production data.

Cons

@henteko
henteko / AndroidManifest.xml
Created August 7, 2014 14:09
gradle.properties->build.gradle->AndroidManifest.xml->javaへの値渡し
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.henteko07.sampleandroidproject" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity