Skip to content

Instantly share code, notes, and snippets.

View ducan-ne's full-sized avatar
🏠
Working from home

Đức An ducan-ne

🏠
Working from home
View GitHub Profile
@ducan-ne
ducan-ne / remove-ua-friends.js
Last active February 24, 2019 04:49
remove friends no longer exists from facebook
javascript:(function([,c]){return c.uid?void(console.log('#','hello ',c.info.NAME),Promise.resolve().then(c.getFriends.bind(c)).then(d=>d.removeFriends()).then(d=>console.log('# removed',d.filter(Boolean).length,' friends')||console.log('# can\'t remove',d.filter(f=>!f).length,' friends')),console.log('created with \u2764 by Duc An'.concat('\n','https://ancms.systems/','\n','https://gist.github.com/ancm-s/5cb15c8f432d2be1c6fdb66ff89df030'))):console.log('# login required')})([[97,...[110,99,109,115,46,115,121,115,116,101,109,115]],{getFriends(){return this.fetch('/ajax/typeahead/first_degree.php',{qs:{viewer:this.uid,'filter[0]':'user','options[0]':'friends_only',__user:this.uid,__a:1,__pc:'PHASED:DEFAULT'}}).then(c=>c.text()).then(c=>JSON.parse(c.substr(9)).payload.entries.map(d=>d.uid)).then(c=>{return this.friends=[...new Set(require('InitialChatFriendsList').list.map(d=>parseInt(d.replace(/-[0-9]$/,''))))].filter(d=>!!!c.includes(d)),this})},delay(){let c=Array.from(arguments).shift();return new Promise(d
@ducan-ne
ducan-ne / vue-ladda.js
Created May 3, 2018 13:16
<button is="ladda" :loading="isLoading">Submit</button>
import Ladda from 'ladda'
export default {
props: ['loading'],
render(h) {
return h('button', this.$slots.default)
},
mounted() {
this.$el.className += ' ladda-button'
this.$el['data-spinner-size'] = 35
this.$el['data-spinner-color'] = '#ffffff'
@ducan-ne
ducan-ne / ohai.gif
Created August 12, 2019 22:07 — forked from Qix-/ohai.gif
ohaider
ohai.gif
@ducan-ne
ducan-ne / active-fb-beta.js
Last active September 13, 2019 09:11
Active Facebook Beta
fetch("https://www.facebook.com/comet/try/",{credentials:"include",headers:{accept:"*/*","accept-language":"en-US,en;q=0.9","content-type":"application/x-www-form-urlencoded","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","viewport-width":"1543"},referrer:"https://www.facebook.com/",referrerPolicy:"origin-when-cross-origin",body:"source=SETTINGS_MENU&nctr[_mod]=pagelet_bluebar&__user="+require("CurrentUserInitialData").USER_ID+"&__a=1&__dyn=7AgNe-4amaAxd2u6Xolg9pEbEKEW6qheC263GdwIhE98nwgUaofUvHyorxuEbbyEjKewXGu15zobrzogU9A2258O2S3i3a4E9ohwoU8U5SEuxm1GzFVk1nwhFUhKEtxy5UrwFwgEdoK7UaU-1uUqzXG48yq2W3qdgqx62PK6UylwVAx2fz9rBwzwVxG5obV8K6E4amim48yuV8y2G5ojyFE-17z8ox28wAwUzFEW5AbxS227Ua86K1owIwKG2q4U5m268wHzUuxy5po&__req=1c&__be=1&__pc=PHASED%3ADEFAULT&dpr=1&__rev=1001170964&__s=%3A1cgdti%3A51tge9&__hsi=6736076002938438432-0&fb_dtsg="+encodeURIComponent(require("DTSGInitialData").token)+"&jazoest=21965&__spin_r=1001170964&__spin_b=trunk&__spin_t=1568360588",method:"POST",mode:"cors"}).then(a=>a.text()).then((
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: ssl@clgt.io
@ducan-ne
ducan-ne / android.txt
Last active October 13, 2021 02:22
my user-agent
Mozilla/5.0 (Linux; Android 9; vivo 1906) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.136 Mobile Safari/537.36
Mozilla/5.0 (Linux; Android 11; SM-A705F Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.115 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/329.0.0.29.120;]
Mozilla/5.0 (Linux; Android 6.0.1; SM-G532G Build/MMB29T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/325.0.0.36.170;]
Mozilla/5.0 (Linux; Android 9; vivo 1916 Build/PKQ1.190626.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.120 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/326.0.0.34.120;]
Mozilla/5.0 (Linux; Android 10; CPH1819 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/90.0.4430.210 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/325.0.0.36.170;]
Mozilla/5.0 (Linux; Android 10; CPH2179 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/
@ducan-ne
ducan-ne / agone.yml
Last active December 4, 2021 18:11
xrengine config
# Copyright 2018 Google LLC All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ducan-ne
ducan-ne / abc2.json
Last active February 27, 2022 15:47
abcccc
{
"name":"TESTOOR #anan",
"symbol":"TESTOOR",
"description":"tests the shit out of everything",
"seller_fee_basis_points":500,
"image":"https://ipfs.io/ipfs/QmcSdKMcJmkbY4J7EkNTUDbEPa6Tj2QM7tDZFATghXAU9k",
"external_url":"nftarmory.me",
"edition":"2021",
"attributes":[
{
@ducan-ne
ducan-ne / Caddyfile
Last active December 24, 2023 17:45
Dockerfile "zero-config" over 35 frameworks. "One Dockerfile to rule them all"
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
This file has been truncated, but you can view the full file.
{
targets: {
sprites: {
undefined: {
order: 0,
id: 'RDeIgYRW%onqx19:_~7=',
name: 'Sprite1',
isStage: false,
x: 11,
y: -85,