This file contains hidden or 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
package pack{ | |
import flash.display.*; | |
import flash.events.*; | |
import flash.utils.*; | |
import mx.core.UIComponent; | |
public class Arkanoid extends UIComponent | |
{ | |
// Definir los parámetros del juego |
This file contains hidden or 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/sh | |
open $1 # Remote | |
# open $2 # Local | |
open $3 # Merged (same as local in most configs) | |
echo # New line | |
echo Compare, merge and save. | |
read -p "Finished (yes/cancel)? " -n 1 -r | |
echo # (optional) move to a new line |
This file contains hidden or 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
def open_with_default_app path_to_file | |
if is_windows? | |
%x{start /MIN #{path_to_file}} | |
elsif is_mac? | |
%x{open -g \"#{path_to_file}\"} | |
elsif is_linux? | |
%x{xdg-open \"#{path_to_file}\"} | |
else | |
puts "Platform not supported: #{RUBY_PLATFORM}" | |
end |
This file contains hidden or 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
# First, install https://github.com/mikesten/git-aware-prompt | |
# simplified prompt like “my_folder (develop)$” | |
export PS1="\W\[$txtcyn\]\$git_branch\[$txtylw\]\$git_dirty\[$txtrst\]\$ " |
This file contains hidden or 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
%x(echo hi) # Return the stdout, redirect stderr to the program's |
This file contains hidden or 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
# Type this directly into terminal | |
# Renames *.aaa to *.bbb | |
for file in *.aaa | |
do | |
mv "$file" "${file/.aaa/.bbb}" | |
done | |
# This works: |
This file contains hidden or 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
# Step 1: Import the .p12 file into a jks keystore | |
keytool -importkeystore -srckeystore original.p12 -srcstoretype pkcs12 -destkeystore temporal.jks -deststoretype jks | |
# Step 2: Create the new .p12 file from the temporal .jks keystore | |
keytool -importkeystore -srckeystore temporal.jks -destkeystore new.p12 -srcstoretype jks -deststoretype pkcs12 | |
# Step 3: Test the new .p12 file | |
keytool -list -v -keystore new.p12 -storetype pkcs12 |
This file contains hidden or 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 UnityEngine.UI; | |
[RequireComponent (typeof (RectTransform), typeof (Collider2D))] | |
public class Collider2DRaycastFilter : MonoBehaviour, ICanvasRaycastFilter | |
{ | |
Collider2D myCollider; | |
RectTransform rectTransform; | |
void Awake () |
This file contains hidden or 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 System.Collections; | |
public class EasyScreenshot : MonoBehaviour | |
{ | |
#region inspector properties | |
[SerializeField] | |
private int superSize = 1; | |
[SerializeField] | |
private string directory = "screenshots"; |
This file contains hidden or 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 System.Collections; | |
public class CameraFixedAspectRatio : MonoBehaviour | |
{ | |
#region inspector properties | |
[SerializeField] | |
private float wantedAspectRatio = 1.5f; | |
[SerializeField] | |
private Color fillColor = Color.black; |
OlderNewer