Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
public class EnumExtension | |
{ | |
enum Test { | |
[Description("This is a foo")] | |
Foo, | |
[Description("This is a bar")] | |
Bar | |
} |
public static class DictionaryUtils | |
{ | |
public static string FindKey(this IDictionary<string, string> lookup, string value) | |
{ | |
foreach (var pair in lookup) | |
{ | |
if (pair.Value == value) | |
return pair.Key; | |
} | |
return ""; |
using UnityEngine; | |
public class MoveSprite : MonoBehaviour | |
{ | |
public tk2dSprite sprite; | |
float Speed = 50f; // 50 meters per second | |
Vector3 TopRightPoint; | |
Vector3 BottomLeftPoint; | |
using UnityEngine; | |
public class UIRandomSpriteSeeder : MonoBehaviour | |
{ | |
private Vector3 TopRightPoint; | |
private Vector3 BottomLeftPoint; | |
void Start() | |
{ | |
BottomLeftPoint = Camera.main.ScreenToWorldPoint( Vector3.zero ); |
// factorials | |
function factorial(n) { | |
if ( n == 0 ) return 1; | |
return n * factorial( n - 1 ); | |
} | |
// triangle numbers | |
function triangle(n) { | |
if ( n == 1 ) return 1; | |
return n + triangle(n-1); | |
} |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
Bash Keyboard Shortcuts | |
Moving the cursor: | |
Ctrl + a Go to the beginning of the line (Home) | |
Ctrl + e Go to the End of the line (End) | |
Ctrl + p Previous command (Up arrow) | |
Ctrl + n Next command (Down arrow) | |
Alt + b Back (left) one word | |
Alt + f Forward (right) one word |
#!/bin/bash | |
# Copy this script to /usr/local/bin or to any bin folder you like. Make executable and use it. | |
# cp bashkeys.sh /usr/local/bin | |
# cmod 755 /usr/local/bin/bashkeys.sh | |
# bashkeys.sh | |
echo ' | |
Bash Keyboard Shortcuts | |
Moving the cursor: |
##### Перемещение курсора: | |
Ctrl + a — переход в начало строки | |
Ctrl + b — переход на 1 символ назад | |
Ctrl + c — посылает программе SIGINT. Обычно, прерывает текущее задание | |
Ctrl + d — удаляет символ под курсором (аналог delete) | |
Ctrl + e — переход к концу строки | |
Ctrl + f — переход на 1 символ вперёд | |
Ctrl + xx — переходит от текущей позиции курса в начало строки и обратно. | |
Ctrl + p — Предыдущая команда (Стрелка вверх) |