Skip to content

Instantly share code, notes, and snippets.

@man-oi
man-oi / gigya.css
Created July 18, 2022 11:45
gigya styles
.gigya-consent-title {
font-weight: bold;
display: block;
font-weight: 700;
font-size: 15px;
font-family: arial;
}
.gigya-consent-subtitle {
font-weight: bold;
display: block;
# get external ip address
(Invoke-WebRequest ifconfig.me/ip).Content.Trim()
@man-oi
man-oi / .htaccess
Created January 22, 2020 20:12
htpasswd
AuthType Basic
AuthName "only for valid users"
AuthUserFile /full/path/.htpasswd
Require valid-user
#php full path: echo realpath('./') . PHP_EOL;
@man-oi
man-oi / getCookie.js
Created May 14, 2019 09:54
function to get Cookie
export default function (cname) {
const name = `${cname}=`;
const decodedCookie = decodeURIComponent(document.cookie);
const ca = decodedCookie.split(';');
for (let i = 0; i < ca.length; i += 1) {
let c = ca[i];
while (c.charAt(0) === ' ') {
c = c.substring(1);
}
if (c.indexOf(name) === 0) {
@man-oi
man-oi / jquery-plugin.js
Created April 29, 2019 12:56
jquery plugin template
(function () {
var pluginName = "pluginName",
defaults = {
propertyName: "value"
};
// The actual plugin constructor
function Plugin(element, options) {
this.element = element;
// jQuery has an extend method which merges the contents of two or
// more objects, storing the result in the first object. The first object
DELETE bad_rows.* from wp_posts as bad_rows inner join ( select post_title, MIN(id) as min_id from wp_posts group by post_title having count(*) > 1 ) as good_rows on good_rows.post_title = bad_rows.post_title and good_rows.min_id <> bad_rows.id
@man-oi
man-oi / keybase.md
Created April 1, 2018 17:23
Keybase proof

Keybase proof

I hereby claim:

  • I am wumble on github.
  • I am wumble (https://keybase.io/wumble) on keybase.
  • I have a public key ASDTSzmIQRvMhavkcqsy-hmncrzuv9g_w0nGcehiPBhb4go

To claim this, I am signing this object:

ErrorDocument 403 /403.php
ErrorDocument 401 /401.php
ErrorDocument 410 /410.php
RewriteCond %{QUERY_STRING} ^status=401$
RewriteRule ^ - [L,R=401]
RewriteCond %{QUERY_STRING} ^status=403$
RewriteRule ^ - [L,R=403]
RewriteCond %{QUERY_STRING} ^status=404$
RewriteRule ^ - [L,R=404]
@man-oi
man-oi / dabblet.css
Last active January 19, 2016 21:17
profile image / settings
/**
* profile image / settings
*/
.container {
width: 700px;
height: auto;
margin: auto;
background-color: #333;
@man-oi
man-oi / dabblet.css
Created March 26, 2013 14:10
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background: #fff;
}
#wrapper {
width: 700px;
height: 30px;
margin: auto;