This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#{rich:clientId('')} // talepForm:mobisNoLabel | |
#{rich:element('')} // document.getElementById('talepForm:mobisNoLabel') | |
#{rich:component('')} // RichFaces.component('talepForm:mobisNoLabel') | |
#{rich:findComponent('')} // javax.faces.component.html.HtmlOutputLabel@48d139c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
discourse make user admin | |
# rails c | |
> u = User.where(email: 'myemail@example.com').first | |
> u.admin = true | |
> u.save | |
token = u.email_tokens.create(email: u.email) | |
EmailToken.confirm(token.token) | |
// starting rails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-server /usr/local/etc/redis.conf # to start server | |
redis-cli # connect server | |
redis-cli shutdown # shutdown server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psql postgres # postgres -> dbname | |
# to quit | |
\q | |
select * from pg_stat_activity; | |
show config_file; | |
# list of tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// start | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
// stop | |
pg_ctl -D /usr/local/var/postgres stop -s -m fast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) throws Exception{ | |
ProcessBuilder pb = new ProcessBuilder("winmergeu", | |
"D:\\path\\to\\file.java", | |
"D:\\path\\to\\file2.java"); | |
pb.start(); | |
for(String i : pb.environment().keySet()){ | |
System.out.println(i + ": " + pb.environment().get(i)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class A { | |
B b; | |
C c; | |
public A() { | |
b = new B(this); | |
c = new C(); | |
} | |
public void hello() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mkayman; | |
import java.util.Arrays; | |
import java.util.List; | |
public class Main { | |
public static void main(String[] args) { | |
List<Item> items = Arrays.asList(new Item("item1", 40), new Item( | |
"item2", 10), new Item("item3", 10), new Item("item4", 10), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
robocopy "D:\source\path" "C:\dest\path" a1.txt a2.txt a3.txt | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function get_java_property (prop varchar2) return varchar2 is | |
language java | |
name 'java.lang.System.getProperty(java.lang.String) return java.lang.String'; | |
and then | |
select get_java_property('java.version') from dual; |
NewerOlder