Skip to content

Instantly share code, notes, and snippets.

View chcepe's full-sized avatar
🏠
Working from home

Christian Cepe chcepe

🏠
Working from home
View GitHub Profile
@xcommerce-gists
xcommerce-gists / getAccessToken-request-cURL
Last active August 2, 2019 09:19
PayPalAccessOpenIDConnectOAuth.cURL
curl https://api.paypal.com/v1/identity/openidconnect/tokenservice \
-u "<your_app_id>:<your_app_secret>" \
-d "client_id=&grant_type=authorization_code&code=<code>&redirect_uri=<urlencoded_return_url>"
@renestalder
renestalder / README.md
Last active June 30, 2024 14:55
Unfollow all on Facebook

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.

@markerikson
markerikson / tableRenderingExample.js
Last active June 25, 2024 22:31
React expandable table rows example
class ParentComponent extends Component {
constructor() {
super();
this.state = {
data : [
{id : 1, date : "2014-04-18", total : 121.0, status : "Shipped", name : "A", points: 5, percent : 50},
{id : 2, date : "2014-04-21", total : 121.0, status : "Not Shipped", name : "B", points: 10, percent: 60},
{id : 3, date : "2014-08-09", total : 121.0, status : "Not Shipped", name : "C", points: 15, percent: 70},
{id : 4, date : "2014-04-24", total : 121.0, status : "Shipped", name : "D", points: 20, percent : 80},
@davej
davej / fetch-timeout.js
Last active July 1, 2022 23:35
Add a pseudo timeout/deadline to a request using the ES6 fetch api
Promise.race([
fetch('/foo'),
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Timeout')), 7000)
)
]);
@branneman
branneman / create-zip.js
Last active July 30, 2021 20:59
Node.js script to create a zip file from a list of files and directories
const stat = require('fs').statSync;
const AdmZip = require('adm-zip');
/**
* Example usage
*/
newArchive(`test-${+new Date}.zip`, [
'index.js',
'package.json',
'node_modules'
var builder = require('botbuilder');
var restify = require('restify');
//Server setup
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function() {
console.log('%s listening to %s', server.name, server.url);
});
@Prasad9
Prasad9 / annotation.xml
Created November 6, 2017 13:54
A sample XML annotation file based on Pascal VOC format.
<annotation>
<folder>GeneratedData_Train</folder>
<filename>000001.png</filename>
<path>/my/path/GeneratedData_Train/000001.png</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>224</width>
<height>224</height>
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 27, 2024 09:08
crack activate Office on mac with license file
@DataTurks
DataTurks / dataturks_to_PascalVOC.py
Last active April 26, 2020 08:54
Covert Dataturks Image bounding box JSON to Pascal VOC format.
import argparse
import sys
import os
import json
import logging
import requests
from PIL import Image
################### INSTALLATION NOTE #######################
##############################################################
@antoniopresto
antoniopresto / Form.js
Last active November 30, 2019 14:04
Antd Masked Input
import { Form } from 'antd'
import { FormInput } from './antd-masked-input'
export default () => (
<Form>
<FormInput
form={this.props.form} // antd form
mask={'111.111.111-11'}
placeholder=""
label={''}