Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
#!/bin/bash | |
# Script to backup git repo to Backblaze B2 | |
# Set bucket, temp_dir, password and account to use for the backup. I keep mine in local env vars | |
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc | |
# Ensure you have authorized the B2 command line tool with the correct account AND added your SSH | |
# public key to your github account, if you need to backup private repositories. | |
# To restore this repo in the future, download it from B2, extract it and then use this command: | |
# cd old-repository.git |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
''' | |
This is a little script to download every song from every playlist | |
if your Google Play Music account. Songs are organized as follows: | |
<playlist>/<artist>/<album>/<song>.mp3 | |
I Highly recomend putting this file in your %USER%\Music folder | |
before running. |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Entropedia | |
{ | |
[RequireComponent(typeof(Light))] | |
[ExecuteInEditMode] |
# Sample toolchain file for building for Windows from an Ubuntu Linux system. | |
# | |
# Typical usage: | |
# *) install cross compiler: `sudo apt-get install mingw-w64` | |
# *) cd build | |
# *) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake .. | |
# This is free and unencumbered software released into the public domain. | |
set(CMAKE_SYSTEM_NAME Windows) | |
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32) |
Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
#!/usr/bin/env python | |
# Tutorial available at: https://www.youtube.com/watch?v=nmb-0KcgXzI | |
# Feedback welcome: [email protected] | |
from gimpfu import * | |
def NAME_OF_MAIN_FUNCTION(image, drawable): | |
# function code goes here... | |
Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.
For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.
This gives an ongoing list of file-type magic numbers.
// example3.c - Demonstrates how to use miniz.c's deflate() and inflate() functions for simple file compression. | |
// Public domain, May 15 2011, Rich Geldreich, [email protected]. See "unlicense" statement at the end of tinfl.c. | |
// For simplicity, this example is limited to files smaller than 4GB, but this is not a limitation of miniz.c. | |
#include "miniz.c" | |
#include <limits.h> | |
typedef unsigned char uint8; | |
typedef unsigned short uint16; | |
typedef unsigned int uint; |