Skip to content

Instantly share code, notes, and snippets.

View csy1204's full-sized avatar

Playdev csy1204

View GitHub Profile
@zeroc0d3
zeroc0d3 / manpath-wrong
Created March 18, 2019 22:58 — forked from seafooler/manpath-wrong
Fix: "manpath: can't set the locale; make sure $LC_* and $LANG are correct"
## Problem
When login in, the shell prints:
```
manpath: can't set the locale; make sure $LC_* and $LANG are correct
```
## Solution
```
sudo locale-gen "en_US.UTF-8"
sudo dpkg-reconfigure locales
@nadir-akhtar
nadir-akhtar / CaptureTheEther.md
Last active March 7, 2022 19:14
My runthrough of the wonderful capturetheether.com. Check me out on the leaderboard, "partywizard", in 24th place as of May 7, 2018. If you notice errors, feel free to bring it up in the discussion section.

Capture the Ether Writeup

This writeup is a runthrough of challenges at https://capturetheether.com/challenges/ built on the Ropsten testnet. I will go through each problem in four steps:

  1. The intention of the contract
  2. The flawed assumption
  3. The process of exploiting the vulnerability
  4. The potential patches

I'll provide examples of the code I wrote as needed. To save time, we'll skip into the Lotteries section, starting with Guess the secret number, as that's the first problem which truly required some thought.

@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@genomics-geek
genomics-geek / README.md
Last active January 10, 2024 15:27
Setting up a Dockerized web application with Django REST APIs, ReactJS with Redux pattern, and Webpack Hot Reloading! Mouthful.

Guide on how to create and set up a Dockerized web app using Django REST APIs and ReactJS

Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"

This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).

I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)

Main features:

  • Django REST APIs
@ursuad
ursuad / kafka-cheat-sheet.md
Last active March 14, 2024 10:32
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@jakebellacera
jakebellacera / vine.rb
Last active December 2, 2016 17:56
vine ruby api
require "httparty"
require "json"
module Vine
# Public: The unofficial interface for the Vine API. Vine requires all
# requests to be authenticated when accessing the API.
#
# Examples
#
# vine = Vine::API.new("username", "password")