Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>HTML Tables</title>
</head>
<body>
<h1>List Colour Flashiz</h1>
<!--
static NSString *kBlack = @"#000000";
static NSString *kWhite = @"#ffffff";
@imam-san
imam-san / netstat.txt
Last active October 30, 2015 03:46
netstat on mac
lsof -i -P | grep -i "listen"
pwdx
func_pwdx.sh
function pwdx {
lsof -a -p $1 -d cwd -n | tail -1 | awk '{print $NF}'
}
@imam-san
imam-san / service.sh
Last active September 15, 2015 12:54
jar on service
SERVICE_NAME=DimoJ
PATH_TO_JAR=/home/imam/jDimoMD/jDimoMD-1.0.1.jar
PID_PATH_NAME=/home/imam/jDimoMD/jdimo_pid
case $1 in
start)
echo "Starting $SERVICE_NAME ..."
if [ ! -f $PID_PATH_NAME ]; then
nohup java -jar $PATH_TO_JAR /tmp 2>> /dev/null >> /dev/null &
echo $! > $PID_PATH_NAME
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Edc_merchant" default="default" basedir=".">
sudo apachectl stop
stop
/System/Library/LaunchDaemons/org.apache.httpd.plist:
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.example", "com.example.MyExampleActivity"));
startActivity(intent);
create file
/etc/logrotate.d/tomcat
content tomcat
"
/opt/tomcat7/logs/catalina.out {
copytruncate
daily
rotate 7
clear file --> clearcache.sh
echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
chmod 755 clearcache.sh
crontab -e
0 3 * * * /path/to/clearcache.sh
touch Cartfile
github "Alamofire/Alamofire" == 2.0
github "SwiftyJSON/SwiftyJSON" ~> 2.3.0
carthage update --platform iOS
add run scrypt
Build Phases
import java.util.*;
public class Main {
// 23,60,36
public static int getint()
{
Random randomGenerator = new Random();