Skip to content

Instantly share code, notes, and snippets.

View frantic's full-sized avatar
👾

Alex Kotliarskyi frantic

👾
View GitHub Profile
@frantic
frantic / run_git_from_delphi.cmd
Created May 7, 2012 17:50
Run Git Gui from Delphi Tools menu
@echo off
cd %1
git gui
" Be iMproved!
set nocompatible
" Setup Vundle
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'scrooloose/nerdtree'
@frantic
frantic / MyTests.dpr
Last active January 26, 2021 11:43
How to run DUnit tests as a part of your continuous integration process?
...
begin
Application.Initialize;
if IsConsole then
// You'll have to add rxbHaltOnFailures param hre
// (Delphi doesn't do it automatically)
with TextTestRunner.RunRegisteredTests(rxbHaltOnFailures) do
Free
else
@frantic
frantic / git-tricks.sh
Created January 29, 2013 15:24
Git secrets I didn't know about
# Show inline diff
git diff HEAD^ --word-diff
# Turn on autocorrection ("comit" -> "commit")
git config --global help.autocorrect 1
# Ultimate blame
git blame -w -CCC
# Get a file from different branch/rev
@frantic
frantic / gist:4742429
Created February 8, 2013 22:21
Bash magic
^X ^E # edit command in $EDITOR, then execute it
!$ # last argument of last command
!:n # n-th argument of last command
var Deck = React.createClass({
getInitialState: function() {
return {
slide: this.props.firstSlide,
following: true,
likedSlides: {}
};
},
});
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This file was created with the aha Ansi HTML Adapter. http://ziz.delphigl.com/tool_aha.php -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8" />
<title>stdin</title>
</head>
<body>
<pre>
@frantic
frantic / .phoenix.js
Last active October 23, 2015 16:54
My Pheonix 2.0 config file
var mod = ['ctrl', 'cmd', 'alt'];
var handlers = [];
function moveWindow(window, shiftX, width, shiftY, height) {
var screen = Screen.mainScreen().visibleFrameInRectangle();
var newFrame = {
x: screen.x + screen.width * shiftX,
y: screen.y + screen.height * shiftY,
width: screen.width * width,
height: screen.height * height,
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,