Skip to content

Instantly share code, notes, and snippets.

View ivantcholakov's full-sized avatar

Ivan Tcholakov ivantcholakov

View GitHub Profile
@bartoszmajsak
bartoszmajsak / .gitconfig
Created May 2, 2012 17:53
Synchronize with upstream
...
[alias]
synchronize-with-upstream = !~/synchronize-with-upstream.sh
...
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 27, 2024 08:12
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@BrianGilbert
BrianGilbert / showprotected-dialog-changes.patch
Created June 30, 2014 01:37
Patch Showprotected plugin to use textarea and have bigger dialog window
diff --git a/showprotected/dialogs/protected.js b/showprotected/dialogs/protected.js
index 9c7ede3..8a06f04 100644
--- a/showprotected/dialogs/protected.js
+++ b/showprotected/dialogs/protected.js
@@ -3,13 +3,13 @@ CKEDITOR.dialog.add( 'showProtectedDialog', function( editor ) {
return {
title: 'Edit Protected Source',
- minWidth: 300,
- minHeight: 60,
@donnierayjones
donnierayjones / LICENSE
Last active March 26, 2024 01:51
Render Bootstrap as "small" layout when printing
Copyright (C) 2016 Donnie Ray Jones
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@hmarr
hmarr / pg_read_only_config.md
Created October 29, 2015 12:02
Safely updating standard_conforming_strings - pg8.1 vs pg8.2

Postgres 8.1

$ ./bin/psql template1
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
@alopresto
alopresto / gpg_git_signing.md
Last active January 18, 2024 22:42
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@define-private-public
define-private-public / HttpServer.cs
Last active May 15, 2024 12:09
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@flowerinthenight
flowerinthenight / rest_client_svr_console.cs
Last active September 18, 2022 10:12
A simple REST client/server console app in C#.
using CommandLine;
using CommandLine.Text;
using Grapevine;
using Grapevine.Client;
using Grapevine.Server;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Diagnostics;
@natanfelles
natanfelles / atom-php.md
Last active January 25, 2024 03:48
Atom PHP Environment + CodeIgniter 3 & 4

Atom PHP Environment + CodeIgniter 3 & 4

Atom Editor

Install

Download and install Atom Editor:

cd ~/Downloads