Skip to content

Instantly share code, notes, and snippets.

View medigeek's full-sized avatar
💭
▶️ Entering flow state✨

Savvas Radevic medigeek

💭
▶️ Entering flow state✨
View GitHub Profile
@medigeek
medigeek / fix_makefile.patch
Created February 5, 2012 21:32
lingua: Makefile (quilt patch)
From: Savvas Radevic <vicedar@gmail.com>
Description: Fix Makefile:
* Change main installation path to /usr/share/java/lingua
* mkdir /usr/bin
* Remove $(DESTDIR) from /usr/bin/lingua contents
Index: lingua-0.0.4/Makefile
===================================================================
--- lingua-0.0.4.orig/Makefile 2012-02-07 21:10:49.000000000 +0100
+++ lingua-0.0.4/Makefile 2012-02-07 21:10:50.000000000 +0100
@medigeek
medigeek / remove_absolute_paths.patch
Created February 7, 2012 16:15
glossa-interpreter: Remove absolute paths (quilt patch)
From: Savvas Radevic <vicedar@gmail.com>
Description: Remove absolute path from filenames
Index: glossa-interpreter-1.0.1/src/glossa/interpreter/core/ASTInterpreter.java
===================================================================
--- glossa-interpreter-1.0.1.orig/src/glossa/interpreter/core/ASTInterpreter.java 2012-02-07 16:24:50.000000000 +0100
+++ glossa-interpreter-1.0.1/src/glossa/interpreter/core/ASTInterpreter.java 2012-02-07 16:29:24.000000000 +0100
@@ -202,7 +202,7 @@
@medigeek
medigeek / fix_makefile.patch
Created February 7, 2012 16:19
glossa-interpreter: Fix Makefile (quilt patch)
From: Savvas Radevic <vicedar@gmail.com>
Description: Create /usr/bin in the destination folder
Index: glossa-interpreter-1.0.1/Makefile
===================================================================
--- glossa-interpreter-1.0.1.orig/Makefile 2012-02-07 17:14:00.000000000 +0100
+++ glossa-interpreter-1.0.1/Makefile 2012-02-07 17:14:01.000000000 +0100
@@ -36,6 +36,7 @@
install:
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 27, 2024 16:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bhurlow
bhurlow / gist:3043629
Created July 3, 2012 21:57
Linux Screen Cheat Sheets
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active July 4, 2024 17:31
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@karlazz
karlazz / WordPress Standalone PHP
Last active June 14, 2021 01:30
Running WordPress functions as a standalone php file
<!DOCTYPE HTML>
<!-- attribution -- this blog provided the code
http://blog.makingsense.com/2011/03/create-stand-alone-web-pages-or-widgets-that-use-wordpress-functions/
-->
<?php
//required include files
require('wp-blog-header.php');
require_once("wp-config.php");
require_once("wp-includes/wp-db.php");
@romainneutron
romainneutron / gist:5340930
Created April 8, 2013 21:59
Download large files using Guzzle
<?php
use Guzzle\Http\Client;
require __DIR__ . '/vendor/autoload.php';
$tmpFile = tempnam(sys_get_temp_dir(), 'guzzle-download');
$handle = fopen($tmpFile, 'w');
$client = new Client('', array(
Client::CURL_OPTIONS => array(
@pocesar
pocesar / get domain without subdomain.php
Created April 11, 2013 20:27
PHP code to get the domain name without subdomains (includes the tld, and the special types from IANA). Don't have support for unicode domain names.
<?php
/**
* @param string $domain Pass $_SERVER['SERVER_NAME'] here
* @param bool $debug
*
* @debug bool $debug
* @return string
*/
function get_domain($domain, $debug = false)
{