git checkout -b <branchname>
git add
git commit -m "description of changes"
| class ApiNewRelicInstrumenter < Grape::Middleware::Base | |
| include NewRelic::Agent::Instrumentation::ControllerInstrumentation | |
| def call_with_newrelic(&block) | |
| trace_options = { | |
| :category => :rack, | |
| :path => "#{route_path}\##{route_method}", | |
| :request => request | |
| } |
| using UnityEngine; | |
| using System.Collections; | |
| public class MonoBehaviourSingleton<T> : MonoBehaviour | |
| where T : Component | |
| { | |
| private static T _instance; | |
| public static T Instance { | |
| get { | |
| if (_instance == null) { |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
| void displayText(const QString &text, const QColor &backgroundColor, const QColor &textColor, const Vec3D &pos) | |
| { | |
| // some magic number (margin, spacing, font size, etc..) | |
| int fontSize = 15; | |
| int text_width=text.size()*(fontSize/1.5)+5, text_height=fontSize+20; | |
| // create the QImage and draw txt into it | |
| QImage textimg(text_width, text_height, QImage::Format_RGB888); | |
| { | |
| QPainter painter(&textimg); |
| import android.os.CountDownTimer; | |
| abstract public class CountUpTimer | |
| { | |
| private CountDownTimer countDownTimer; | |
| private int countDownCycle; | |
| public CountUpTimer(long countUpInterval) { | |
| countDownTimer = new CountDownTimer(Long.MAX_VALUE, countUpInterval) { | |
| @Override |
| public static String getExternalSdCardPath() { | |
| String path = null; | |
| File sdCardFile = null; | |
| List<String> sdCardPossiblePath = Arrays.asList("external_sd", "ext_sd", "external", "extSdCard"); | |
| for (String sdPath : sdCardPossiblePath) { | |
| File file = new File("/mnt/", sdPath); | |
| if (file.isDirectory() && file.canWrite()) { |
| // Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs" | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using UnityEditor; | |
| namespace UnityGuidRegenerator { | |
| public class UnityGuidRegeneratorMenu { |