Skip to content

Instantly share code, notes, and snippets.

View istvan-antal's full-sized avatar

István Antal istvan-antal

View GitHub Profile
@istvan-antal
istvan-antal / .gitconfig
Created December 7, 2018 10:51
gitconfig
[alias]
wd = diff -w --word-diff --word-diff-regex=[^[:space:],]+
s = status
l = log --all --graph --pretty='format:%C(yellow)%h%Cblue%d%Creset %s.%C(white) %an, %ar%Creset'
lc = log --graph --pretty='format:%C(yellow)%h%Cblue%d%Creset %s.%C(white) %an, %ar%Creset'
lf = log --name-status --oneline
unstage = reset HEAD
c = commit -a
discard = reset --hard HEAD
undo-last-commit = reset --soft HEAD^
@istvan-antal
istvan-antal / typescriptreact.json
Last active November 27, 2018 20:32
VSCode TypeScript React Snippets
{
// Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@istvan-antal
istvan-antal / typescript.json
Last active November 27, 2018 20:32
VSCode TypeScript Snippets
{
// Place your snippets for typescript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",

Keybase proof

I hereby claim:

  • I am istvan-antal on github.
  • I am istvan (https://keybase.io/istvan) on keybase.
  • I have a public key ASD6FAQr-VD5QRU4uDP1qmhVMP7Xb8mdbbo4HwqmFtj7Mgo

To claim this, I am signing this object:

@istvan-antal
istvan-antal / init.lua
Created February 23, 2016 09:28
Hammerspoon file
--------------------------------------------------------------------------------
-- rtoshiro - https://github.com/rtoshiro
-- You should see: http://www.hammerspoon.org/docs/index.html
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- CONSTANTS
--------------------------------------------------------------------------------
local cmd_alt = {"cmd", "alt"}
worker_processes 1;
error_log /opt/local/var/log/nginx/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
@istvan-antal
istvan-antal / gist:badbf3a6d9f4601f77e6
Last active August 29, 2015 14:13
JSON with Obj-C
NSData *returnedData = [@"{\"foo\":\"a\", \"bar\":\"b\"}" dataUsingEncoding:NSUTF8StringEncoding];
NSError *error = nil;
NSDictionary *results = [NSJSONSerialization
JSONObjectWithData: returnedData
options:0
error:&error];
for (NSString * key in results) {
NSLog(@"%@=%@", key, results[key]);
@istvan-antal
istvan-antal / default
Created September 25, 2014 05:38
Jenkins Nginx vhost
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
listen [::]:80 default ipv6only=on;
server_name _;
location / {
@istvan-antal
istvan-antal / .slate.js
Created July 17, 2014 09:32
Slate Config
// Configs
S.cfga({
"defaultToCurrentScreen": true,
"secondsBetweenRepeat": 0.1,
"checkDefaultsOnLoad": true,
"focusCheckWidthMax": 3000,
"orderScreensLeftToRight": true
});
var laptopDisplay = "1440x900",
@istvan-antal
istvan-antal / my.cnf
Last active August 29, 2015 14:03
OS X Mac MySQL config
[mysqld_safe]
socket = /tmp/mysql.sock
[mysqld]
socket = /tmp/mysql.sock