function get_cert()
{
local host="$1"
local port="$2"
if [ -z "$port" ]
then
port="443"
fi
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Facebook Login JavaScript Example</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<p id="greeting">Test</p> | |
<script> | |
// This is called with the results from from FB.getLoginStatus(). |
This file contains hidden or 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
'use strict'; | |
// Code not verified / tested though. -Tianze | |
var express = require("express"); | |
var fs = require("fs"); | |
var _ = require("underscore"); | |
var dbJsonFileName = "carts.json"; | |
var dbJson = fs.readFileSync(dbJsonFileName, 'utf8'); |
This file contains hidden or 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
#!/bin/sh | |
set -e | |
# ================================================================ | |
# << Update >> | |
# Running the following is enough, no need to build yourself | |
# sudo yum install epel-release.noarch | |
# sudo yum install xsel | |
# ================================================================ |
This file contains hidden or 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
#!/bin/sh | |
set -e | |
# ================================================================ | |
# << Update >> | |
# Running the following is enough, no need to build yourself | |
# sudo yum install epel-release.noarch | |
# sudo yum install xclip | |
# ================================================================ |
(Assuming your executable script is called foo
)
- Create your script in
/etc/init.d/foo
- Add it
chkconfig --add foo
- Enable it
chkconfig foo on
Let's say you have a SysV Init Script
named foo
-
Copy the file to
/etc/init.d/foo
-
Enable the SysV service:
chkconfig --add foo
-
Enable the SysV service:
chkconfig foo on
-
Start the service:
service foo start
. After this, systemd-sysv-generator will generate this file/run/systemd/generator.late/foo.service
, copy this file to/etc/systemd/system
by running:cp /run/systemd/generator.late/foo.service /etc/systemd/system/foo.service
-
Edit
/etc/systemd/system/foo.service
by runningsystemctl edit foo.service
, add in the following line tofoo.servie
(this makes the service installable)
[Install]
This file contains hidden or 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
// ==UserScript== | |
// @name Fork 18m WSVT | |
// @namespace 18m | |
// @description Just fork it | |
// @updateURL https://gist.github.com/houtianze/ee2cf2f4d022911566a09e77bcfc9233/raw | |
// @version 0.1.1 | |
// @grant none | |
// @include http*://*.ibm.com/WSVTASEAN/*IsamDetails.action | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js | |
// ==/UserScript== |
This file contains hidden or 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
#!/bin/sh | |
pullall() { | |
curdir=`pwd` | |
if [ -d ".git" ] | |
then | |
echo "Git pulling at $curdir" | |
git pull | |
else | |
echo "Skipping non git directory $curdir" |
This file contains hidden or 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
:: you need to have apktool in your path | |
if not x%1==x goto doit | |
:usage | |
echo %~n0 ^<smali dir^> | |
goto end | |
:doit | |
set EXTRA_SIGN_AGS= | |
if not x%KEYPASS%==x set EXTRA_SIGN_AGS=-storepass %KEYPASS% -keypass %KEYPASS% |