Skip to content

Instantly share code, notes, and snippets.

@emreyo
emreyo / j4
Created December 15, 2014 14:44
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
@emreyo
emreyo / j3
Created December 15, 2014 14:44
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
@emreyo
emreyo / j2
Created December 15, 2014 14:44
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
@emreyo
emreyo / j1
Created December 15, 2014 14:44
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
@emreyo
emreyo / gist:a899b4c9be32484fe65f
Last active August 29, 2015 14:07
upgrade laravel 4.1 to 4.2
MySQL:
alter table users add column remember_token varchar(100) null after id;
User class:
public function getRememberToken()
{
return $this->remember_token;
}
gsettings get org.compiz.integrated command-screenshot
egrep -l -H "(applets-screenshooter|snapshot)" /usr/share/applications/* | grep -oP "^.*/\K(.*?)(?=\.desktop)"
This command looks for desktop applications with the snapshot keyword or the applets-screenshooter icon and outputs only the desktop file name (without the extension).
To use the output for example in a bash script:
$ screenshooter="$(egrep -l -H "(applets-screenshooter|snapshot)" /usr/share/applications/* | grep -oP "^.*/\K(.*?)(?=\.desktop)")"
$ echo $screenshooter
.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml